bind all getCallBacksWithContext functions

pull/1/head
yann300 5 years ago
parent 63674647ee
commit bdd54054a1
  1. 4
      src/app/ui/sendTxCallbacks.js
  2. 4
      src/app/ui/universal-dapp-ui.js

@ -18,7 +18,7 @@ module.exports = {
}
}
const continueCb = (error, continueTxExecution, cancelCb) => {
const continueCb = function (error, continueTxExecution, cancelCb) {
if (error) {
const msg = typeof error !== 'string' ? error.message : error
modalDialog(
@ -41,7 +41,7 @@ const continueCb = (error, continueTxExecution, cancelCb) => {
}
}
const promptCb = (okCb, cancelCb) => {
const promptCb = function (okCb, cancelCb) {
modalCustom.promptPassphrase('Passphrase requested', 'Personal mode is enabled. Please provide passphrase of account', '', okCb, cancelCb)
}

@ -253,7 +253,7 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i
self.logCallback(`${logMsg}`)
}
if (args.funABI.type === 'fallback') data.dataHex = value
self.udapp.callFunction(args.address, data, args.funABI, callbacksInContext.confirmationCb.bind(callbacksInContext), callbacksInContext.continueCb, callbacksInContext.promptCb, (error, txResult) => {
self.udapp.callFunction(args.address, data, args.funABI, callbacksInContext.confirmationCb.bind(callbacksInContext), callbacksInContext.continueCb.bind(callbacksInContext), callbacksInContext.promptCb.bind(callbacksInContext), (error, txResult) => {
if (!error) {
var isVM = self.executionContext.isVM()
if (isVM) {
@ -278,7 +278,7 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i
self.logCallback(msg)
}, (data, runTxCallback) => {
// called for libraries deployment
self.udapp.runTx(data, callbacksInContext.confirmationCb, runTxCallback)
self.udapp.runTx(data, callbacksInContext.confirmationCb.bind(callbacksInContext), runTxCallback)
})
}

Loading…
Cancel
Save