mirror of
https://github.com/trezor/trezor-wallet
synced 2025-03-09 21:26:04 +00:00
Add some ethe utils tests
This commit is contained in:
parent
366e5f4d10
commit
6272e45b02
@ -20,6 +20,7 @@ describe('eth utils', () => {
|
||||
});
|
||||
|
||||
it('padLeftEven', () => {
|
||||
// TODO: add more tests
|
||||
expect(utils.padLeftEven('2540be3ff')).toBe('02540be3ff');
|
||||
});
|
||||
|
||||
@ -39,6 +40,14 @@ describe('eth utils', () => {
|
||||
});
|
||||
|
||||
it('calculate gas price', () => {
|
||||
// TODO: add more tests
|
||||
expect(utils.calcGasPrice(new BigNumber(9898998989), 9)).toBe('89090990901');
|
||||
});
|
||||
|
||||
it('validate address', () => {
|
||||
// TODO: add more tests
|
||||
expect(utils.validateAddress('')).toBe('Address is not set');
|
||||
expect(utils.validateAddress('aaa')).toBe('Address is not valid');
|
||||
expect(utils.validateAddress('BB9bc244D798123fDe783fCc1C72d3Bb8C189413')).toBe('Address is not valid');
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user