mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-01 03:40:53 +00:00
rewrite static notification condition (xrp || txrp)
This commit is contained in:
parent
2c24b75d47
commit
3ebce65093
@ -15,10 +15,11 @@ export default (props: Props) => {
|
|||||||
if (!location || !selectedAccount || !account) return null;
|
if (!location || !selectedAccount || !account) return null;
|
||||||
|
|
||||||
// Ripple minimum reserve notification
|
// Ripple minimum reserve notification
|
||||||
|
if (account.networkType === 'ripple') {
|
||||||
const { reserve, balance } = account;
|
const { reserve, balance } = account;
|
||||||
const bigBalance = new Bignumber(balance);
|
const bigBalance = new Bignumber(balance);
|
||||||
const bigReserve = new Bignumber(reserve);
|
const bigReserve = new Bignumber(reserve);
|
||||||
if (location.pathname.includes('xrp') && (bigBalance.lessThan(bigReserve) || bigBalance.lessThanOrEqualTo(new Bignumber(0)))) {
|
if (bigBalance.lessThan(bigReserve)) {
|
||||||
notifications.push(
|
notifications.push(
|
||||||
<Notification
|
<Notification
|
||||||
key="xrp-warning"
|
key="xrp-warning"
|
||||||
@ -28,6 +29,7 @@ export default (props: Props) => {
|
|||||||
/>,
|
/>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
|
Loading…
Reference in New Issue
Block a user