-
-
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
Merged
+13
−8
Merged
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9c7fc96
use hex number
estebanmino 5af58c1
password set
estebanmino 7a7941c
publish-pre-release-android
estebanmino 303bf2e
Revert "publish-pre-release-android"
estebanmino 28ae877
Revert "Revert "publish-pre-release-android""
estebanmino 5500e97
KeyringController.isUnlocked
estebanmino b7c80d7
only isUnlocked
estebanmino e5412fc
fromTokenMinimalUnit
estebanmino 03546c9
Revert "Revert "Revert "publish-pre-release-android"""
estebanmino ead98a3
Merge branch 'develop' into bugfix/payment-requestss
estebanmino 26cdd22
|| '0'
estebanmino dee5a25
changelog
estebanmino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ import { colors } from '../../../styles/common'; | |
import Engine from '../../../core/Engine'; | ||
import EditAmount from '../../Views/SendFlow/Amount'; | ||
import ConfirmSend from '../../Views/SendFlow/Confirm'; | ||
import { toBN, BNToHex, hexToBN, fromWei } from '../../../util/number'; | ||
import { toBN, BNToHex, hexToBN, fromWei, fromTokenMinimalUnit } from '../../../util/number'; | ||
import { toChecksumAddress } from 'ethereumjs-util'; | ||
import { strings } from '../../../../locales/i18n'; | ||
import { getTransactionOptionsTitle } from '../../UI/Navbar'; | ||
|
@@ -245,7 +245,6 @@ class Send extends PureComponent { | |
parameters = null | ||
}) => { | ||
const { addressBook, network, identities, selectedAddress } = this.props; | ||
|
||
if (chain_id) { | ||
this.handleNetworkSwitch(chain_id); | ||
} | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. now we have to handle token "atomic" units from deeplinks |
||
}; | ||
newTxMeta.transactionToName = getTransactionToName({ | ||
addressBook, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 |
||
const transferValue = renderFromTokenMinimalUnit(amount, decimals); | ||
transactionValue = `${transferValue} ${symbol}`; | ||
const exchangeRate = contractExchangeRates[address]; | ||
|
@@ -905,7 +905,6 @@ class Confirm extends PureComponent { | |
transactionConfirmed, | ||
paymentChannelBalance | ||
} = this.state; | ||
|
||
return ( | ||
<SafeAreaView style={styles.wrapper} testID={'txn-confirm-screen'}> | ||
<View style={styles.inputWrapper}> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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