-
Notifications
You must be signed in to change notification settings - Fork 26
feat: rpc send tokens #659
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
base: refactor/big-int
Are you sure you want to change the base?
Conversation
06c1f1d
to
925a29e
Compare
17ca208
to
5bc205f
Compare
e7301c4
to
091b89f
Compare
return '-'; | ||
} | ||
|
||
return numberUtils.prettyValue(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.
We should format considering NFT as well.
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.
Done, thanks
433c4fe
to
f395832
Compare
091b89f
to
71e796a
Compare
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 this PR is missing the i18n files.
if (!tokenId) { | ||
return constants.DEFAULT_NATIVE_TOKEN_CONFIG.symbol; | ||
} |
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 changed this in the desktop wallet PR. Now we don't have a default and you just check if it's the default native token UID
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.
Refactored to be exactly like the hathor wallet
<Text style={styles.labelText}>{t`Data field`}</Text> | ||
<View style={styles.valueContainer}> | ||
<Text style={styles.monospace}> | ||
{output.data.join(',')} |
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.
We also need to change this, just like in the desktop wallet
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.
2bce8bf
to
98fb803
Compare
return numberUtils.prettyValue(value); | ||
const isNFT = tokenId && helpersUtils.isTokenNFT(tokenId, tokenMetadata); | ||
|
||
return numberUtils.prettyValue(value, isNFT ? 0 : constants.DECIMAL_PLACES); |
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.
After the decimal places refactor you should use the redux state here as well
8b7b0b7
to
b87a1d4
Compare
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.
Looks good. I've placed some comments about the code base.
src/screens/SendAmountInput.js
Outdated
onAmountUpdate={onAmountChange} | ||
value={amount} | ||
allowOnlyInteger={isNFT()} | ||
style={{ flex: 1 }} |
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.
add the comments from the prev version, it could be helpful in a future time
// we need this so the placeholder doesn't break in android
// devices after erasing the text
// https://github.com/facebook/react-native/issues/30666
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.
Done! Thanks
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.
Code looks good! Tks for addressing the refactors.
Hey! 👋 From a UX/UI perspective, here are some suggestions and questions:
The Figma file: https://www.figma.com/design/qQZ91mzazEgiGJbKs1mKUc/Nano-Contracts?node-id=3339-3113&t=DAVFJhGAkbykMYmN-1 |
Screen.Recording.2025-03-09.at.15.43.59.mov
Acceptance Criteria
sendTransaction
RPC requestsSecurity Checklist