mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-01 04:38:15 +00:00
add "sequence" and "availableBalance" to Account
This commit is contained in:
parent
8bc2ec4206
commit
cbded16091
@ -82,6 +82,8 @@ export const discoverAccount = (device: TrezorDevice, discoveryProcess: Discover
|
||||
addressPath: path,
|
||||
address: ethAddress,
|
||||
balance: account.balance,
|
||||
availableBalance: account.balance,
|
||||
sequence: account.nonce,
|
||||
nonce: account.nonce,
|
||||
block: account.block,
|
||||
transactions: account.transactions,
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
import TrezorConnect from 'trezor-connect';
|
||||
import * as DISCOVERY from 'actions/constants/discovery';
|
||||
import { toDecimalAmount } from 'utils/formatUtils';
|
||||
|
||||
import type {
|
||||
PromiseAction,
|
||||
@ -64,9 +65,11 @@ export const discoverAccount = (device: TrezorDevice, discoveryProcess: Discover
|
||||
network: network.shortcut,
|
||||
deviceID: device.features ? device.features.device_id : '0',
|
||||
deviceState: device.state || '0',
|
||||
addressPath: account.path,
|
||||
addressPath: account.path || [],
|
||||
address: account.address,
|
||||
balance: account.balance,
|
||||
balance: toDecimalAmount(account.balance, 6),
|
||||
availableBalance: toDecimalAmount(account.availableBalance, 6),
|
||||
sequence: account.sequence,
|
||||
nonce: account.sequence,
|
||||
block: account.block,
|
||||
transactions: account.transactions,
|
||||
|
@ -20,6 +20,8 @@ export type Account = {
|
||||
+addressPath: Array<number>;
|
||||
+address: string;
|
||||
balance: string;
|
||||
availableBalance: string;
|
||||
sequence: number;
|
||||
nonce: number;
|
||||
block: number;
|
||||
transactions: number;
|
||||
|
Loading…
Reference in New Issue
Block a user