UNPKG

@ledgerhq/live-common

Version:
16 lines (14 loc) 534 B
import { SwapTransactionType } from "./types"; export const maybeTezosAccountUnrevealedAccount = ( swapTransaction: SwapTransactionType, ): Error | undefined => { if ( swapTransaction?.transaction?.family == "tezos" && swapTransaction?.transaction?.estimatedFees && !swapTransaction?.transaction?.fees?.eq(swapTransaction?.transaction?.estimatedFees) ) { const tezosError = new Error("Cannot swap with an unrevealed Tezos account"); tezosError.name = "TezosUnrevealedAccount"; return tezosError; } };