Skip to content

Commit

Permalink
chore: feedbacks
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Prohaszka <stephane.prohaszka@ledger.fr>
  • Loading branch information
sprohaszka-ledger committed May 13, 2024
1 parent 3bedf62 commit 14b1501
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import prepareTransaction from "./prepareTransaction";
import createTransaction from "./createTransaction";
import { getTransactionStatus } from "./transactionStatus";

const TEZOS_BURN_ADDRESS = "tz1burnburnburnburnburnburnburjAYjjX";

const estimateMaxSpendable = async ({
account,
parentAccount,
Expand All @@ -20,7 +22,7 @@ const estimateMaxSpendable = async ({
...createTransaction(),
...transaction,
// estimate using a burn address that exists so we don't enter into NotEnoughBalanceBecauseDestinationNotCreated
recipient: transaction?.recipient || "tz1burnburnburnburnburnburnburjAYjjX",
recipient: transaction?.recipient || TEZOS_BURN_ADDRESS,
useAllAmount: true,
});
const s = await getTransactionStatus(mainAccount, t);
Expand Down
18 changes: 5 additions & 13 deletions libs/coin-modules/coin-tezos/src/types/signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ export type TezosSignature = {
signature: string;
};
// Type coming from hw-app-tezos
export const TezosCurves = {
ED25519: 0x00,
SECP256K1: 0x01,
SECP256R1: 0x02,
type TezosCurves = {
ED25519: 0x00;
SECP256K1: 0x01;
SECP256R1: 0x02;
};
export type Curve = (typeof TezosCurves)[keyof typeof TezosCurves];
export type Curve = TezosCurves[keyof TezosCurves];

export type LedgerSigner = {
publicKey(): Promise<string>;
Expand Down Expand Up @@ -46,11 +46,3 @@ export interface TezosSigner {
// Tezos [LedgerSigner](https://www.npmjs.com/package/@taquito/ledger-signer)
createLedgerSigner(path: string, prompt: boolean, derivationType: number): LedgerSigner;
}

// export type SignerContext = <T>(
// deviceId: string,
// path: string,
// prompt: boolean,
// derivationType: number,
// fn: (signer: TezosSigner) => Promise<T>,
// ) => Promise<T>;

0 comments on commit 14b1501

Please sign in to comment.