aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-23 02:59:08 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-23 02:59:08 +0800
commit3d451ddf3e59e8d4ac610b7e6a01a59beed4f944 (patch)
tree93193c3014065d00fc14d2efcdca8a11c63e2e4a /ui/app/actions.js
parent8592ffd85582612ae18b5f4e5ed6749401f86f3b (diff)
parent3756384da6cb7d1566271cb99ec561d3b051a4ac (diff)
downloadtangerine-wallet-browser-3d451ddf3e59e8d4ac610b7e6a01a59beed4f944.tar.gz
tangerine-wallet-browser-3d451ddf3e59e8d4ac610b7e6a01a59beed4f944.tar.zst
tangerine-wallet-browser-3d451ddf3e59e8d4ac610b7e6a01a59beed4f944.zip
Merge branch 'master' into i390-TransactionLimit
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index dadf124d8..c6c932296 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -135,6 +135,8 @@ var actions = {
// QR STUFF:
SHOW_QR: 'SHOW_QR',
getQr: getQr,
+ reshowQrCode: reshowQrCode,
+ SHOW_QR_VIEW: 'SHOW_QR_VIEW',
}
module.exports = actions
@@ -717,6 +719,7 @@ function coinShiftRquest (data, marketData) {
if (response.error) return dispatch(actions.showWarning(response.error))
var message = `
Deposit your ${response.depositType} to the address bellow:`
+ _accountManager.createShapeShiftTx(response.deposit, response.depositType)
dispatch(actions.getQr(response.deposit, '125x125', [message].concat(marketData)))
})
}
@@ -738,6 +741,32 @@ function getQr (data, size, message) {
})
}
}
+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))
+
+ var message = [
+ `Deposit your ${coin} to the address bellow:`,
+ `Deposit Limit: ${mktResponse.limit}`,
+ `Deposit Minimum:${mktResponse.minimum}`,
+ ]
+
+ qrRequest(data, '125x125', (response) => {
+ dispatch(actions.hideLoadingIndication())
+ dispatch({
+ type: actions.SHOW_QR_VIEW,
+ value: {
+ qr: response,
+ message: message,
+ data: data,
+ },
+ })
+ })
+ })
+ }
+}
function shapeShiftRequest (query, options, cb) {
var queryResponse, method