Skip to content

Commit 22ab3af

Browse files
authored
Merge pull request #204 from MyEtherWallet/develop
Alpha 0.0.2
2 parents 8aa0a08 + 141cb41 commit 22ab3af

File tree

207 files changed

+5145
-10026
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+5145
-10026
lines changed

Diff for: .babelrc

+26-21
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
{
2-
"plugins": [
3-
[
4-
"transform-runtime", {
5-
"helpers": false,
6-
"polyfill": false,
7-
"regenerator": true,
8-
"moduleName": "babel-runtime"
9-
}
10-
],
11-
["module-resolver", {
12-
"root": ["./common"],
13-
"alias": {
14-
"underscore": "lodash"
15-
},
16-
"cwd": "babelrc"
17-
}],
18-
"react-hot-loader/babel"],
19-
"presets": ["es2015", "react", "stage-0", "flow"],
20-
"env": {
21-
"production": {
22-
"presets": ["react-optimize"]
2+
"plugins": [
3+
[
4+
"transform-runtime",
5+
{
6+
"helpers": false,
7+
"polyfill": false,
8+
"regenerator": true,
9+
"moduleName": "babel-runtime"
2310
}
11+
],
12+
[
13+
"module-resolver",
14+
{
15+
"root": ["./common"],
16+
"alias": {
17+
"underscore": "lodash"
18+
},
19+
"cwd": "babelrc"
20+
}
21+
],
22+
"react-hot-loader/babel"
23+
],
24+
"presets": ["es2015", "react", "stage-0", "flow"],
25+
"env": {
26+
"production": {
27+
"presets": ["react-optimize"]
2428
}
29+
}
2530
}

Diff for: .gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@ jspm_packages
4141

4242
# Optional REPL history
4343
.node_repl_history
44+
45+
# VScode workspace settings
46+
.vscode/
47+
static/dll.vendor.js
48+
dll

Diff for: common/actions/deterministicWallets.js

+8-5
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,32 @@ export type DeterministicWalletData = {
1414
export type GetDeterministicWalletsAction = {
1515
type: 'DW_GET_WALLETS',
1616
payload: {
17+
seed: ?string,
1718
dPath: string,
18-
publicKey: string,
19-
chainCode: string,
19+
publicKey: ?string,
20+
chainCode: ?string,
2021
limit: number,
2122
offset: number
2223
}
2324
};
2425

2526
export type GetDeterministicWalletsArgs = {
27+
seed: ?string,
2628
dPath: string,
27-
publicKey: string,
28-
chainCode: string,
29+
publicKey: ?string,
30+
chainCode: ?string,
2931
limit?: number,
3032
offset?: number
3133
};
3234

3335
export function getDeterministicWallets(
3436
args: GetDeterministicWalletsArgs
3537
): GetDeterministicWalletsAction {
36-
const { dPath, publicKey, chainCode, limit, offset } = args;
38+
const { seed, dPath, publicKey, chainCode, limit, offset } = args;
3739
return {
3840
type: 'DW_GET_WALLETS',
3941
payload: {
42+
seed,
4043
dPath,
4144
publicKey,
4245
chainCode,

Diff for: common/actions/notifications.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export type ShowNotificationAction = {
2020
export function showNotification(
2121
level: NOTIFICATION_LEVEL = 'info',
2222
msg: Element<*> | string,
23-
duration?: number
23+
duration?: number | INFINITY
2424
): ShowNotificationAction {
2525
return {
2626
type: 'SHOW_NOTIFICATION',

Diff for: common/actions/rates.js

+17-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
// @flow
22

3+
export type FiatRequestedRatesAction = {
4+
type: 'RATES_FIAT_REQUESTED'
5+
};
6+
7+
export function fiatRequestedRates() {
8+
return {
9+
type: 'RATES_FIAT_REQUESTED'
10+
};
11+
}
12+
313
/*** Set rates ***/
4-
export type SetRatesAction = {
5-
type: 'RATES_SET',
14+
export type FiatSucceededRatesAction = {
15+
type: 'RATES_FIAT_SUCCEEDED',
616
payload: { [string]: number }
717
};
818

9-
export function setRates(payload: { [string]: number }): SetRatesAction {
19+
export function fiatSucceededRates(payload: {
20+
[string]: number
21+
}): FiatSucceededRatesAction {
1022
return {
11-
type: 'RATES_SET',
23+
type: 'RATES_FIAT_SUCCEEDED',
1224
payload
1325
};
1426
}
1527

1628
/*** Union Type ***/
17-
export type RatesAction = SetRatesAction;
29+
export type RatesAction = FiatSucceededRatesAction | FiatRequestedRatesAction;

Diff for: common/actions/wallet.js

+28-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// @flow
2-
import BaseWallet from 'libs/wallet/base';
2+
import type { IWallet } from 'libs/wallet/IWallet';
33
import Big from 'bignumber.js';
4+
import { Wei } from 'libs/units';
45

56
/*** Unlock Private Key ***/
67
export type PrivateKeyUnlockParams = {
@@ -42,13 +43,35 @@ export function unlockKeystore(
4243
};
4344
}
4445

46+
/*** Unlock Mnemonic ***/
47+
export type MnemonicUnlockParams = {
48+
phrase: string,
49+
pass: string,
50+
path: string,
51+
address: string
52+
};
53+
54+
export type UnlockMnemonicAction = {
55+
type: 'WALLET_UNLOCK_MNEMONIC',
56+
payload: MnemonicUnlockParams
57+
};
58+
59+
export function unlockMnemonic(
60+
value: MnemonicUnlockParams
61+
): UnlockMnemonicAction {
62+
return {
63+
type: 'WALLET_UNLOCK_MNEMONIC',
64+
payload: value
65+
};
66+
}
67+
4568
/*** Set Wallet ***/
4669
export type SetWalletAction = {
4770
type: 'WALLET_SET',
48-
payload: BaseWallet
71+
payload: IWallet
4972
};
5073

51-
export function setWallet(value: BaseWallet): SetWalletAction {
74+
export function setWallet(value: IWallet): SetWalletAction {
5275
return {
5376
type: 'WALLET_SET',
5477
payload: value
@@ -58,10 +81,10 @@ export function setWallet(value: BaseWallet): SetWalletAction {
5881
/*** Set Balance ***/
5982
export type SetBalanceAction = {
6083
type: 'WALLET_SET_BALANCE',
61-
payload: Big
84+
payload: Wei
6285
};
6386

64-
export function setBalance(value: Big): SetBalanceAction {
87+
export function setBalance(value: Wei): SetBalanceAction {
6588
return {
6689
type: 'WALLET_SET_BALANCE',
6790
payload: value

Diff for: common/api/bity.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function getOrderStatus(orderid: string) {
5757
}
5858

5959
function _getAllRates() {
60-
return fetch(`${bityConfig.bityAPI}/v1/rate2/`)
60+
return fetch(`${bityConfig.bityURL}/v1/rate2/`)
6161
.then(checkHttpStatus)
6262
.then(parseJSON);
6363
}

Diff for: common/assets/images/icon-help-2.svg

+1
Loading

Diff for: common/assets/images/logo-coinbase.svg

+1
Loading

Diff for: common/assets/images/logo-ledger.svg

+1
Loading

Diff for: common/assets/images/logo-trezor.svg

+1
Loading

0 commit comments

Comments
 (0)