From 752d16f6c072b0dd54eb245209881a25ff06cb8e Mon Sep 17 00:00:00 2001 From: Frankie Date: Thu, 18 Aug 2016 10:40:35 -0700 Subject: WIP: ShapeShift tx --- ui/app/actions.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'ui/app/actions.js') diff --git a/ui/app/actions.js b/ui/app/actions.js index 326c811af..48a425d50 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -133,6 +133,8 @@ var actions = { // QR STUFF: SHOW_QR: 'SHOW_QR', getQr: getQr, + reshowQrCode: reshowQrCode, + SHOW_QR_VIEW: 'SHOW_QR_VIEW', } module.exports = actions @@ -698,6 +700,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))) }) } @@ -719,6 +722,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 -- cgit From 3525dc080110e7af1f9544e18b5646c87fb9ae95 Mon Sep 17 00:00:00 2001 From: Frankie Date: Thu, 18 Aug 2016 15:20:26 -0700 Subject: Create a ShapeShift tx in tx History --- ui/app/actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/app/actions.js') diff --git a/ui/app/actions.js b/ui/app/actions.js index 9b99a05c1..c6c932296 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -747,7 +747,7 @@ function reshowQrCode (data, coin) { shapeShiftRequest('marketinfo', {pair: `${coin.toLowerCase()}_eth`}, (mktResponse) => { if (mktResponse.error) return dispatch(actions.showWarning(mktResponse.error)) - var message =[ + var message = [ `Deposit your ${coin} to the address bellow:`, `Deposit Limit: ${mktResponse.limit}`, `Deposit Minimum:${mktResponse.minimum}`, -- cgit