diff options
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 29 |
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 |