-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Receive bug and more tests #2562
Conversation
src/app/ui/universal-dapp-ui.js
Outdated
@@ -161,7 +161,7 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address | |||
const fallback = self.udapp.getFallbackInterface(contractABI) | |||
const receive = self.udapp.getReceiveInterface(contractABI) | |||
const args = { | |||
funABI: fallback, | |||
funABI: (fallback ? fallback : receive), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and if both are defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then it's fine. fallback is default one
src/app/ui/universal-dapp-ui.js
Outdated
@@ -177,16 +177,22 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address | |||
} | |||
} | |||
if (calldata) { | |||
if (calldata.length > 3 && calldata.substr(0, 2) === '0x') { | |||
if (calldata.length < 2) setLLIError('the calldata should be a valid hexadecimal value with size of at least one byte.') | |||
if (calldata.length < 4 && calldata.substr(0, 2) === '0x') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is more than that, the size should be even
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:) thanks
src/app/ui/universal-dapp-ui.js
Outdated
// if receive is defined and that there is no calldata => receive function is called | ||
// if fallback is defined => fallback function is called | ||
if (receive && !calldata) args.funABI = receive | ||
if (fallback) args.funABI = fallback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will rewrite your previous change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed , changed it
No description provided.