A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
ciphermask/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.tes...

26 lines
676 B

import { calcMaxAmount } from './amount-max-button.utils';
describe('amount-max-button utils', () => {
describe('calcMaxAmount()', () => {
it('should calculate the correct amount when no sendToken defined', () => {
expect(
calcMaxAmount({
balance: 'ffffff',
gasTotal: 'ff',
sendToken: false,
}),
).toStrictEqual('ffff00');
});
it('should calculate the correct amount when a sendToken is defined', () => {
expect(
calcMaxAmount({
sendToken: {
decimals: 10,
},
tokenBalance: '64',
}),
).toStrictEqual('e8d4a51000');
});
});
});