mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-28 00:41:08 +00:00
Remove notification if you have enough xrp
This commit is contained in:
parent
ecde81ca86
commit
35892652a8
@ -6,19 +6,21 @@ import Notification from 'components/Notification';
|
||||
import type { Props } from '../../index';
|
||||
|
||||
export default (props: Props) => {
|
||||
const { selectedAccount } = props;
|
||||
const { account } = selectedAccount;
|
||||
const { location } = props.router;
|
||||
if (!location) return null;
|
||||
|
||||
const notifications: Array<Notification> = [];
|
||||
|
||||
if (location.pathname.includes('xrp')) {
|
||||
if (!location || !selectedAccount || !account) return null;
|
||||
|
||||
// Ripple minimum reserve notification
|
||||
if (location.pathname.includes('xrp') && parseInt(account.balance, 10) < 20) {
|
||||
notifications.push(
|
||||
<Notification
|
||||
key="example"
|
||||
key="xrp-warning"
|
||||
type="warning"
|
||||
title="Minimum account reserve required"
|
||||
message="The Base Reserve is a minimum amount of XRP that is required for every address in the ledger. Currently, this is 20 XRP."
|
||||
cancelable
|
||||
/>,
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user