-
-
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
bugfix/payment requests & deeplinks #1751
Conversation
This reverts commit 7a7941c.
!existingUser ? DeeplinkManager.setDeeplink(deeplink) : DeeplinkManager.parse(deeplink); | ||
const { KeyringController } = Engine.context; | ||
const isUnlocked = KeyringController.isUnlocked(); | ||
isUnlocked ? DeeplinkManager.parse(deeplink) : DeeplinkManager.setDeeplink(deeplink); |
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're checking if keyring is unlocked to store a deeplink or parse it right away
app/components/Views/Send/index.js
Outdated
@@ -292,7 +291,7 @@ class Send extends PureComponent { | |||
amount: BNToHex(tokenAmount) | |||
}), | |||
value: '0x0', | |||
readableValue: parameters.uint256 || '0' | |||
readableValue: fromTokenMinimalUnit(parameters.uint256, selectedAsset.decimals) || '0' |
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.
now we have to handle token "atomic" units from deeplinks
@@ -436,7 +436,7 @@ class Confirm extends PureComponent { | |||
contractBalances[address] ? contractBalances[address] : '0', | |||
decimals | |||
)} ${symbol}`; | |||
[transactionTo, , amount] = decodeTransferData('transfer', data); | |||
[transactionTo, amount] = decodeTransferData('transfer', data); |
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 were taking a parsed number from the hex format, now we take the hex number
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.
QA Passed 👍
* use hex number * password set * publish-pre-release-android * Revert "publish-pre-release-android" This reverts commit 7a7941c. * Revert "Revert "publish-pre-release-android"" This reverts commit 303bf2e. * KeyringController.isUnlocked * only isUnlocked * fromTokenMinimalUnit * Revert "Revert "Revert "publish-pre-release-android""" This reverts commit 28ae877. * || '0' * changelog
Description
We were using the parsed decimal number instead of the hex number to get the token amount from the
data
https://trello.com/c/qhpAxjC1/192-walletconnect-not-working-on-android and https://trello.com/c/ubVPsajC/193-payment-request-deeplink-showing-wrong-amount
Checklist
Issue
Resolves #???