mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-23 23:57:15 +01:00
13 lines
469 B
TypeScript
13 lines
469 B
TypeScript
import { Account } from '@suite-common/wallet-types';
|
|
import { PROTO } from '@trezor/connect';
|
|
|
|
import { hasNetworkFeatures } from './accountUtils';
|
|
|
|
export const getAreSatoshisUsed = (bitcoinAmountUnit: PROTO.AmountUnit, account: Account) => {
|
|
const areSatsDisplayed = bitcoinAmountUnit === PROTO.AmountUnit.SATOSHI;
|
|
|
|
const areUnitsSupportedByNetwork = hasNetworkFeatures(account, 'amount-unit');
|
|
|
|
return areSatsDisplayed && areUnitsSupportedByNetwork;
|
|
};
|