support passing bytes to fallback

pull/3094/head
yann300 6 years ago
parent 52fa5c15a7
commit 1670587d5e
  1. 3
      src/multiParamManager.js
  2. 3
      src/universal-dapp.js

@ -183,6 +183,9 @@ class MultiParamManager {
if (this.funABI.inputs && this.funABI.inputs.length > 0) {
contractProperty.classList.add(css.hasArgs)
} else if (this.funABI.type === 'fallback') {
contractProperty.classList.add(css.hasArgs)
this.contractActionsContainerSingle.querySelector('i').style.visibility = 'hidden'
} else {
this.contractActionsContainerSingle.querySelector('i').style.visibility = 'hidden'
this.basicInputField.style.display = 'none'

@ -205,7 +205,7 @@ UniversalDApp.prototype.call = function (isUserAction, args, value, lookupOnly,
}
}
// contractsDetails is used to resolve libraries
txFormat.buildData(args.contractName, args.contractAbi, self.data.contractsDetails, false, args.funABI, value, (error, data) => {
txFormat.buildData(args.contractName, args.contractAbi, self.data.contractsDetails, false, args.funABI, args.funABI.type !== 'fallback' ? value : '', (error, data) => {
if (!error) {
if (isUserAction) {
if (!args.funABI.constant) {
@ -214,6 +214,7 @@ UniversalDApp.prototype.call = function (isUserAction, args, value, lookupOnly,
self._deps.logCallback(`${logMsg}`)
}
}
if (args.funABI.type === 'fallback') data.dataHex = value
self.callFunction(args.address, data, args.funABI, (error, txResult) => {
if (!error) {
var isVM = executionContext.isVM()

Loading…
Cancel
Save