Skip to content

Commit

Permalink
Merge pull request #124 from polkawallet-io/threebody-0.1.7
Browse files Browse the repository at this point in the history
[M2] 0.1.7
  • Loading branch information
0xthreebody authored Jun 22, 2019
2 parents 07893d9 + 56d2938 commit cf4a2ad
Show file tree
Hide file tree
Showing 796 changed files with 36,403 additions and 12,842 deletions.
28 changes: 22 additions & 6 deletions .babelrc
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
{
"presets": ["module:metro-react-native-babel-preset"],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/transform-runtime", {
"helpers": true,
"regenerator": false
}]
[
"@babel/plugin-transform-flow-strip-types"
],
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
[
"@babel/plugin-proposal-class-properties",
{
"loose":true
}
],
[
"@babel/transform-runtime",
{
"helpers": true,
"regenerator": false
}
]
]

}
Empty file modified .buckconfig
100644 → 100755
Empty file.
945 changes: 945 additions & 0 deletions .eslintrc.js

Large diffs are not rendered by default.

Empty file modified .flowconfig
100644 → 100755
Empty file.
11 changes: 11 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
printWidth: 120, // 换行字符串阈值 | Newline string threshold
semi: false, // 句末加分号 | Add a semicolon at the end of the sentence
singleQuote: true, // 用单引号 | Use single quote
trailingComma: 'none', // 最后一个对象元素加逗号 | Last object element with comma
bracketSpacing: true, // 对象,数组加空格 | Object, array plus space
jsxBracketSameLine: false, // jsx > 是否另起一行 | Jsx > whether to start another line
arrowParens: 'avoid', // (x) => {} 是否要有小括号 | (x) => {} Need parentheses
requirePragma: false, // 是否要注释来决定是否格式化代码 | Comment to decide whether to format the code?
proseWrap: 'preserve' // 是否要换行 | Whether or not to break a line
}
4 changes: 2 additions & 2 deletions .update
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"token": "Deleted...Need add it by yourself:)"
}
"token": "Need add yourself token"
}
2 changes: 1 addition & 1 deletion .watchmanconfig
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
165 changes: 93 additions & 72 deletions App.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,83 +1,104 @@
import React, { Component } from 'react';
import {
View,
StyleSheet
} from 'react-native';
import {StackNavigator} from 'react-navigation'
import Tabbed_Navigation from './src/code/Tabbed_Navigation.js'
import Create_Account from './src/code/Assets/secondary/Create_Account'
import Backup_Account from './src/code/Assets/secondary/Backup_Account'
import QR_Code from './src/code/Assets/secondary/QR_Code'
import Coin_details from './src/code/Assets/secondary/coin_details'
import Manage_Account from './src/code/Profile/secondary/Manage_Account'
import Transfer from './src/code/Assets/secondary/Transfer/transfer'
import Make_transfer from './src/code/Assets/secondary/Transfer/make_transfer'
import Transfer_details from './src/code/Assets/secondary/Transfer/Transfer_details'
import Addresses from './src/code/Profile/secondary/Addresses'
import Add_address from './src/code/Profile/secondary/add_address'
import Address_information from './src/code/Profile/secondary/address_information'
import Camera from './src/code/Assets/secondary/camera'
import Validator_Info from './src/code/Staking/secondary/Validator_Info'
import Stake from './src/code/Staking/secondary/stake'
import Nominate from './src/code/Staking/secondary/nominate'
import Unstake from './src/code/Staking/secondary/unstake'
import Unnominate from './src/code/Staking/secondary/unnominate'
import Preferences from './src/code/Staking/secondary/preferences'
import Change_Password from './src/code/Profile/secondary/Change/Change_Password'
import Change_Name from './src/code/Profile/secondary/Change/Change_Name'
import NayorAye from './src/code/Democracy/secondary/NayorAye'
import Settings from './src/code/Profile/secondary/Settings'
import Set_Node from './src/code/Profile/secondary/Settings/Set_Node'
import About from './src/code/Profile/secondary/About'
import Gesture from './src/code/Profile/secondary/Settings/Gesture'




import {Provider} from 'mobx-react'
//获取store实例
import React, { Component } from 'react'
import { StackNavigator } from 'react-navigation'
import { Provider } from 'mobx-react'
import Api from '@polkadot/api/promise'
import WsProvider from '@polkadot/rpc-provider/ws'
import Tabbed_Navigation from './src/page/TabbedNavigation'
import Create_Account from './src/page/Assets/secondary/CreateAccount'
import Backup_Account from './src/page/Assets/secondary/BackupAccount'
import MnemonicWord_1 from './src/page/Assets/secondary/MnemonicWord_1'
import MnemonicWord_2 from './src/page/Assets/secondary/MnemonicWord_2'
import MnemonicWord_3 from './src/page/Assets/secondary/MnemonicWord_3'
import QR_Code from './src/page/Assets/secondary/QRCode'
import Coin_details from './src/page/Assets/secondary/CoinDetails'
import Manage_Account from './src/page/Profile/secondary/ManageAccount'
import Transfer from './src/page/Assets/secondary/Transfer/Transfer'
import Make_transfer from './src/page/Assets/secondary/Transfer/MakeTransfer'
import Transfer_details from './src/page/Assets/secondary/Transfer/TransferDetails'
import Addresses from './src/page/Profile/secondary/Addresses'
import Add_address from './src/page/Profile/secondary/AddAddress'
import Address_information from './src/page/Profile/secondary/AddressInformation'
import Camera from './src/page/Assets/secondary/Camera'
import Validator_Info from './src/page/Staking/secondary/ValidatorInfo'
import Stake from './src/page/Staking/secondary/Stake'
import BondFunds from './src/page/Staking/secondary/BondFunds'
import Unbond from './src/page/Staking/secondary/Unbond'
import BondAdditional from './src/page/Staking/secondary/BondAdditional'
import SetSessionKey from './src/page/Staking/secondary/SetSessionKey'
import Nominate from './src/page/Staking/secondary/Nominate'
import Unstake from './src/page/Staking/secondary/Unstake'
import Unnominate from './src/page/Staking/secondary/Unnominate'
import Change_Password from './src/page/Profile/secondary/Change/ChangePassword'
import Change_Name from './src/page/Profile/secondary/Change/ChangeName'
import NayorAye from './src/page/Democracy/secondary/NayorAye'
import Settings from './src/page/Profile/secondary/Settings'
import Set_Node from './src/page/Profile/secondary/Settings/SetNode'
import About from './src/page/Profile/secondary/About'
import Gesture from './src/page/Profile/secondary/Settings/Gesture'
import { setJSExceptionHandler } from './src/util/error_guard'
// 获取store实例 | Get store instance
import AppState from './src/mobx/mobx'

const Polkawallet_App = StackNavigator({
Tabbed_Navigation:{screen:Tabbed_Navigation,navigationOptions:{header:null}},
Create_Account:{screen:Create_Account,navigationOptions:{header:null}},
Backup_Account:{screen:Backup_Account,navigationOptions:{header:null}},
QR_Code:{screen:QR_Code,navigationOptions:{header:null}},
Coin_details:{screen:Coin_details,navigationOptions:{header:null}},
Manage_Account:{screen:Manage_Account,navigationOptions:{header:null}},
Transfer:{screen:Transfer,navigationOptions:{header:null}},
Make_transfer:{screen:Make_transfer,navigationOptions:{header:null}},
Transfer_details:{screen:Transfer_details,navigationOptions:{header:null}},
Addresses:{screen:Addresses,navigationOptions:{header:null}},
Add_address:{screen:Add_address,navigationOptions:{header:null}},
Address_information:{screen:Address_information,navigationOptions:{header:null}},
Camera:{screen:Camera,navigationOptions:{header:null}},
Validator_Info:{screen:Validator_Info,navigationOptions:{header:null}},
Stake:{screen:Stake,navigationOptions:{header:null}},
Nominate:{screen:Nominate,navigationOptions:{header:null}},
Unstake:{screen:Unstake,navigationOptions:{header:null}},
Unnominate:{screen:Unnominate,navigationOptions:{header:null}},
Preferences:{screen:Preferences,navigationOptions:{header:null}},
Change_Password:{screen:Change_Password,navigationOptions:{header:null}},
Change_Name:{screen:Change_Name,navigationOptions:{header:null}},
NayorAye:{screen:NayorAye,navigationOptions:{header:null}},
Settings:{screen:Settings,navigationOptions:{header:null}},
Set_Node:{screen:Set_Node,navigationOptions:{header:null}},
About:{screen:About,navigationOptions:{header:null}},
Gesture:{screen:Gesture,navigationOptions:{header:null}},
const Polkawallet_App = StackNavigator({
Tabbed_Navigation: {
screen: Tabbed_Navigation,
navigationOptions: { header: null }
},
Create_Account: { screen: Create_Account, navigationOptions: { header: null } },
Backup_Account: { screen: Backup_Account, navigationOptions: { header: null } },
QR_Code: { screen: QR_Code, navigationOptions: { header: null } },
Coin_details: { screen: Coin_details, navigationOptions: { header: null } },
Manage_Account: { screen: Manage_Account, navigationOptions: { header: null } },
Transfer: { screen: Transfer, navigationOptions: { header: null } },
Make_transfer: { screen: Make_transfer, navigationOptions: { header: null } },
Transfer_details: {
screen: Transfer_details,
navigationOptions: { header: null }
},
Addresses: { screen: Addresses, navigationOptions: { header: null } },
Add_address: { screen: Add_address, navigationOptions: { header: null } },
Address_information: {
screen: Address_information,
navigationOptions: { header: null }
},
Camera: { screen: Camera, navigationOptions: { header: null } },
Validator_Info: { screen: Validator_Info, navigationOptions: { header: null } },
Stake: { screen: Stake, navigationOptions: { header: null } },
BondFunds: { screen: BondFunds, navigationOptions: { header: null } },
Unbond: { screen: Unbond, navigationOptions: { header: null } },
BondAdditional: { screen: BondAdditional, navigationOptions: { header: null } },
SetSessionKey: { screen: SetSessionKey, navigationOptions: { header: null } },
Nominate: { screen: Nominate, navigationOptions: { header: null } },
Unstake: { screen: Unstake, navigationOptions: { header: null } },
Unnominate: { screen: Unnominate, navigationOptions: { header: null } },
Change_Password: { screen: Change_Password, navigationOptions: { header: null } },
Change_Name: { screen: Change_Name, navigationOptions: { header: null } },
NayorAye: { screen: NayorAye, navigationOptions: { header: null } },
Settings: { screen: Settings, navigationOptions: { header: null } },
Set_Node: { screen: Set_Node, navigationOptions: { header: null } },
About: { screen: About, navigationOptions: { header: null } },
Gesture: { screen: Gesture, navigationOptions: { header: null } },
MnemonicWord_1: { screen: MnemonicWord_1, navigationOptions: { header: null } },
MnemonicWord_2: { screen: MnemonicWord_2, navigationOptions: { header: null } },
MnemonicWord_3: { screen: MnemonicWord_3, navigationOptions: { header: null } }
})

})


setJSExceptionHandler(() => {}, true)

export default class Polkawallet extends Component {
componentWillMount() {
;(async () => {
const provider = new WsProvider(AppState.stateStore.ENDPOINT)
const api = await Api.create(provider)
AppState.stateStore.API = api
})()
}

render() {
return (
<Provider rootStore={AppState}>
<Polkawallet_App/>
<Polkawallet_App />
</Provider>

);
)
}
}

75 changes: 75 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Polkawallet Code of Conduct

Like the technical community as a whole, the Polkawallet team and community is made up of a mixture of professionals and volunteers from all over the world, working on every aspect of the mission - including mentorship, teaching, and connecting people.

Diversity is one of our huge strengths, but it can also lead to communication issues and unhappiness. To that end, we have a few ground rules that we ask people to adhere to. This code applies equally to founders, mentors and those seeking help and guidance.

This isn’t an exhaustive list of things that you can’t do. Rather, take it in the spirit in which it’s intended - a guide to make it easier to enrich all of us and the technical communities in which we participate.

This code of conduct applies to all spaces managed by the Polkawallet project or Polkawallet Software Foundation. In addition, violations of this code outside these spaces may affect a person's ability to participate within them.

If you believe someone is violating the code of conduct, we ask that you report it by emailing [email protected]. For more details please see our Reporting Guidelines

- **Be friendly and patient.**
- **Be welcoming.** We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.
- **Be considerate.** Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language.
- **Be respectful.** Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. Members of the Polkawallet community should be respectful when dealing with other members as well as with people outside the Polkawallet community.
- **Be careful in the words that you choose.** We are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren't acceptable. This includes, but is not limited to:
- Violent threats or language directed against another person.
- Discriminatory jokes and language.
- Posting sexually explicit or violent material.
- Posting (or threatening to post) other people's personally identifying information ("doxing").
- Personal insults, especially those using racist or sexist terms.
- Unwelcome sexual attention.
- Advocating for, or encouraging, any of the above behavior.
- Repeated harassment of others. In general, if someone asks you to stop, then stop.
- **When we disagree, try to understand why. **Disagreements, both social and technical, happen all the time and Polkawallet is no exception. It is important that we resolve disagreements and differing views constructively. Remember that we’re different. The strength of Polkawallet comes from its varied community, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes.

## Polkawallet Code of Conduct - Reporting Guide

If you believe someone is violating the code of conduct we ask that you report it to the Polkawallet management by emailing [email protected]. **All reports will be kept confidential.** In some cases we may determine that a public statement will need to be made. If that's the case, the identities of all victims and reporters will remain confidential unless those individuals instruct us otherwise.

**If you believe anyone is in physical danger, please notify appropriate law enforcement first.** If you are unsure what law enforcement agency is appropriate, please include this in your report and we will attempt to notify them.

If you are unsure whether the incident is a violation, or whether the space where it happened is covered by this Code of Conduct, we encourage you to still report it. We would much rather have a few extra reports where we decide to take no action, rather than miss a report of an actual violation. We do not look negatively on you if we find the incident is not a violation. And knowing about incidents that are not violations, or happen outside our spaces, can also help us to improve the Code of Conduct or the processes surrounding it.

In your report please include:

- Your contact info (so we can get in touch with you if we need to follow up)
- Names (real, nicknames, or pseudonyms) of any individuals involved. If there were other witnesses besides you, please try to include them as well.
- When and where the incident occurred. Please be as specific as possible.
- Your account of what occurred. If there is a publicly available record (e.g. a discussion area or a public issue logger) please include a link.
- Any extra context you believe existed for the incident.
- If you believe this incident is ongoing.
- Any other information you believe we should have.

**What happens after you file a report?**
You will receive an email from the Polkawallet management Code of Conduct Working Group acknowledging receipt immediately. We promise to acknowledge receipt within 24 hours (and will aim for much quicker than that).

The working group will immediately meet to review the incident and determine:

- What happened.
- Whether this event constitutes a code of conduct violation.
- Who the bad actor was.
- Whether this is an ongoing situation, or if there is a threat to anyone's physical safety.

If this is determined to be an ongoing incident or a threat to physical safety, the working groups' immediate priority will be to protect everyone involved. This means we may delay an "official" response until we believe that the situation has ended and that everyone is physically safe.

Once the working group has a complete account of the events they will make a decision as to how to response. Responses may include:

- Nothing (if we determine no violation occurred).
- A private reprimand from the working group to the individual(s) involved.
- A public reprimand.
- An imposed vacation (i.e. asking someone to "take a week off" from Polkawallet git organization).
- A permanent or temporary ban from some or all Polkawallet spaces.
- A request for a public or private apology.

We'll respond within one week to the person who filed the report with either a resolution or an explanation of why the situation is not yet resolved.

Once we've determined our final action, we'll contact the original reporter to let them know what action (if any) we'll be taking. We'll take into account feedback from the reporter on the appropriateness of our response, but we don't guarantee we'll act on it.

Finally, the Working Group will make a report on the situation to the Polkawallet management board. The board may choose to a public report of the incident.

----

This Code of Conduct is adapted from the [Django Code of Conduct](https://www.djangoproject.com/conduct/), version `577a02bbe `available at <https://github.com/django/djangoproject.com/blob/577a02bbe968de79f8e111d6139f0c1299e994e9/templates/conduct/index.html>
Loading

0 comments on commit cf4a2ad

Please sign in to comment.