-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: parse argument value by custom type #537
Conversation
22b81f0
to
0ebc917
Compare
// XXX: We may want to extend to show the token symbol of | ||
// registered tokens. |
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.
I think we should do it. What we can do is to show: tokenUid (tokenSymbol)
and the token symbol only if the token is registered, or ir the default token.
What do you think?
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.
I have added it at: 3d5f6f6
a4d0169
to
d81d87b
Compare
src/components/WalletConnect/NanoContract/NanoContractMethodArgs.js
Outdated
Show resolved
Hide resolved
src/components/WalletConnect/NanoContract/NanoContractMethodArgs.js
Outdated
Show resolved
Hide resolved
@@ -129,6 +144,60 @@ export const NanoContractMethodArgs = ({ blueprintId, method, ncArgs }) => { | |||
) | |||
}; | |||
|
|||
/** | |||
* Component resposible to render the appropriate format for the value |
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.
* Component resposible to render the appropriate format for the value | |
* Component responsible to render the appropriate format for the value |
* | ||
* Remarks | ||
* The values received in here when derived from 'byte' type like | ||
* 'TxOutputScript', 'TokenUid' and 'VertexId' are already in its |
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.
* 'TxOutputScript', 'TokenUid' and 'VertexId' are already in its | |
* 'TxOutputScript', 'TokenUid' and 'VertexId' are already in their |
* taking in consideration the type. | ||
* | ||
* Remarks | ||
* The values received in here when derived from 'byte' type like |
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.
* The values received in here when derived from 'byte' type like | |
* The values received here when derived from 'byte' type like |
* hexadecimal format. | ||
* | ||
* Values of type 'Address', which also derives from 'byte' are | ||
* in its base58 format. |
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.
* in its base58 format. | |
* in base58 format. |
* Values of type 'SignedData[Result]' arrives here using its data | ||
* part already. |
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.
What does this mean?
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.
I mean, it is already in presentation format.
src/utils.js
Outdated
const script = hathorLib.bufferUtils.hexToBuffer(scriptData); | ||
return hathorLib.scriptsUtils.parseScript(script, network); | ||
} catch { | ||
// Avoid to throw exception when we can't parse the script no matter the reason |
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.
// Avoid to throw exception when we can't parse the script no matter the reason | |
// Avoid throwing exception when we can't parse the script no matter the reason |
return hathorLib.scriptsUtils.parseScript(script, network); | ||
} catch { | ||
// Avoid to throw exception when we can't parse the script no matter the reason | ||
return null; |
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.
log debug here?
Acceptance Criteria
The arguments component parsed by custom type
Security Checklist