diff options
author | Frankie <frankie.pangilinan@consensys.net> | 2016-11-11 08:53:47 +0800 |
---|---|---|
committer | Frankie <frankie.pangilinan@consensys.net> | 2016-11-11 08:53:47 +0800 |
commit | f665b779cbc0f503198e67c5e10bccd2e0e0d2bb (patch) | |
tree | 71e1657d744f8fbf3f55a70d713d6a7701833a9f /ui | |
parent | 161ff62fdcf6f76f7243a1e865dd0cccbc89121f (diff) | |
parent | 3775a4bf799efc99cfe3d46b35fc0b39a82c94c2 (diff) | |
download | tangerine-wallet-browser-f665b779cbc0f503198e67c5e10bccd2e0e0d2bb.tar tangerine-wallet-browser-f665b779cbc0f503198e67c5e10bccd2e0e0d2bb.tar.gz tangerine-wallet-browser-f665b779cbc0f503198e67c5e10bccd2e0e0d2bb.tar.bz2 tangerine-wallet-browser-f665b779cbc0f503198e67c5e10bccd2e0e0d2bb.tar.lz tangerine-wallet-browser-f665b779cbc0f503198e67c5e10bccd2e0e0d2bb.tar.xz tangerine-wallet-browser-f665b779cbc0f503198e67c5e10bccd2e0e0d2bb.tar.zst tangerine-wallet-browser-f665b779cbc0f503198e67c5e10bccd2e0e0d2bb.zip |
Merge branch 'master' into i328-MultiVault
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/actions.js | 21 | ||||
-rw-r--r-- | ui/app/components/coinbase-form.js | 4 | ||||
-rw-r--r-- | ui/app/components/shapeshift-form.js | 2 |
3 files changed, 11 insertions, 16 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 070ba2da0..0d2e7f521 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -44,7 +44,6 @@ var actions = { unlockInProgress: unlockInProgress, // error handling displayWarning: displayWarning, - showWarning: showWarning, // alias DISPLAY_WARNING: 'DISPLAY_WARNING', HIDE_WARNING: 'HIDE_WARNING', hideWarning: hideWarning, @@ -184,7 +183,7 @@ function confirmSeedWords () { background.clearSeedWordCache((err, account) => { dispatch(actions.hideLoadingIndication()) if (err) { - return dispatch(actions.showWarning(err.message)) + return dispatch(actions.displayWarning(err.message)) } console.log('Seed word cache cleared. ' + account) @@ -384,7 +383,7 @@ function agreeToDisclaimer () { dispatch(this.showLoadingIndication()) background.agreeToDisclaimer((err) => { if (err) { - return dispatch(actions.showWarning(err.message)) + return dispatch(actions.displayWarning(err.message)) } dispatch(this.hideLoadingIndication()) @@ -456,7 +455,7 @@ function lockMetamask () { background.setLocked((err) => { dispatch(actions.hideLoadingIndication()) if (err) { - return dispatch(actions.showWarning(err.message)) + return dispatch(actions.displayWarning(err.message)) } dispatch({ @@ -472,7 +471,7 @@ function showAccountDetail (address) { background.setSelectedAddress(address, (err, address) => { dispatch(actions.hideLoadingIndication()) if (err) { - return dispatch(actions.showWarning(err.message)) + return dispatch(actions.displayWarning(err.message)) } dispatch({ @@ -586,10 +585,6 @@ function hideSubLoadingIndication () { } } -function showWarning (text) { - return this.displayWarning(text) -} - function displayWarning (text) { return { type: actions.DISPLAY_WARNING, @@ -641,7 +636,7 @@ function saveAccountLabel (account, label) { background.saveAccountLabel(account, label, (err) => { dispatch(actions.hideLoadingIndication()) if (err) { - return dispatch(actions.showWarning(err.message)) + return dispatch(actions.displayWarning(err.message)) } dispatch({ type: actions.SAVE_ACCOUNT_LABEL, @@ -717,7 +712,7 @@ function shapeShiftSubview (network) { shapeShiftRequest('marketinfo', {pair}, (mktResponse) => { shapeShiftRequest('getcoins', {}, (response) => { dispatch(actions.hideSubLoadingIndication()) - if (mktResponse.error) return dispatch(actions.showWarning(mktResponse.error)) + if (mktResponse.error) return dispatch(actions.displayWarning(mktResponse.error)) dispatch({ type: actions.SHAPESHIFT_SUBVIEW, value: { @@ -734,7 +729,7 @@ function coinShiftRquest (data, marketData) { return (dispatch) => { dispatch(actions.showLoadingIndication()) shapeShiftRequest('shift', { method: 'POST', data}, (response) => { - if (response.error) return dispatch(actions.showWarning(response.error)) + if (response.error) return dispatch(actions.displayWarning(response.error)) var message = ` Deposit your ${response.depositType} to the address bellow:` background.createShapeShiftTx(response.deposit, response.depositType) @@ -756,7 +751,7 @@ function reshowQrCode (data, coin) { return (dispatch) => { dispatch(actions.showLoadingIndication()) shapeShiftRequest('marketinfo', {pair: `${coin.toLowerCase()}_eth`}, (mktResponse) => { - if (mktResponse.error) return dispatch(actions.showWarning(mktResponse.error)) + if (mktResponse.error) return dispatch(actions.displayWarning(mktResponse.error)) var message = [ `Deposit your ${coin} to the address bellow:`, diff --git a/ui/app/components/coinbase-form.js b/ui/app/components/coinbase-form.js index efd05ec96..3c5708bf8 100644 --- a/ui/app/components/coinbase-form.js +++ b/ui/app/components/coinbase-form.js @@ -116,10 +116,10 @@ CoinbaseForm.prototype.toCoinbase = function () { props.dispatch(actions.buyEth(address, props.buyView.amount)) } else if (!isValidAmountforCoinBase(amount).valid) { message = isValidAmountforCoinBase(amount).message - return props.dispatch(actions.showWarning(message)) + return props.dispatch(actions.displayWarning(message)) } else { message = 'Receiving address is invalid.' - return props.dispatch(actions.showWarning(message)) + return props.dispatch(actions.displayWarning(message)) } } diff --git a/ui/app/components/shapeshift-form.js b/ui/app/components/shapeshift-form.js index 2bb384b94..1da549288 100644 --- a/ui/app/components/shapeshift-form.js +++ b/ui/app/components/shapeshift-form.js @@ -244,7 +244,7 @@ ShapeshiftForm.prototype.updateCoin = function (event) { if (!coinOptions[coin.toUpperCase()] || coin.toUpperCase() === 'ETH') { var message = 'Not a valid coin' - return props.dispatch(actions.showWarning(message)) + return props.dispatch(actions.displayWarning(message)) } else { return props.dispatch(actions.pairUpdate(coin)) } |