Skip to content

Commit

Permalink
fix(ton): Rebase adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
ayelenmurano committed May 7, 2024
1 parent 2d9c57d commit 1b56c0a
Show file tree
Hide file tree
Showing 6 changed files with 18,019 additions and 18,026 deletions.
35,817 changes: 17,908 additions & 17,909 deletions apps/ledger-live-desktop/cryptoassets.md

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions libs/coin-modules/coin-ton/src/bridge.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ const ton: CurrenciesData<Transaction> = {
index: 0,
freshAddress: ADDRESS,
freshAddressPath: PATH,
freshAddresses: [
{
address: ADDRESS,
derivationPath: PATH,
},
],
xpub: PUBKEY,
blockHeight: 0,
operations: [],
Expand Down
4 changes: 2 additions & 2 deletions libs/coin-modules/coin-ton/src/transaction.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { getAccountUnit } from "@ledgerhq/coin-framework/account/index";
import { formatCurrencyUnit } from "@ledgerhq/coin-framework/currencies/index";
import { formatTransactionStatus } from "@ledgerhq/coin-framework/formatters";
import {
formatTransactionStatusCommon as formatTransactionStatus,
fromTransactionCommonRaw,
fromTransactionStatusRawCommon as fromTransactionStatusRaw,
toTransactionCommonRaw,
toTransactionStatusRawCommon as toTransactionStatusRaw,
} from "@ledgerhq/coin-framework/transaction/common";
} from "@ledgerhq/coin-framework/serialization";
import type { Account } from "@ledgerhq/types-live";
import BigNumber from "bignumber.js";
import type { Transaction, TransactionRaw } from "./types";
Expand Down
8 changes: 4 additions & 4 deletions libs/coin-modules/coin-ton/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import BigNumber from "bignumber.js";
import { estimateFee } from "./bridge/bridgeHelpers/api";
import { TonComment, TonHwParams, Transaction } from "./types";

export const getAddress = (a: Account): Address =>
a.freshAddresses.length > 0
? a.freshAddresses[0]
: { address: a.freshAddress, derivationPath: a.freshAddressPath };
export const getAddress = (a: Account): Address => ({
address: a.freshAddress,
derivationPath: a.freshAddressPath,
});

export const isAddressValid = (recipient: string) =>
TonAddress.isRaw(recipient) || TonAddress.isFriendly(recipient);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
/* eslint-disable no-console */
import { readFileSync, existsSync, writeFileSync } from "fs";
import BigNumber from "bignumber.js";
import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
import { CryptoCurrencyId } from "@ledgerhq/types-cryptoassets";
import { Account, AccountRaw } from "@ledgerhq/types-live";
import { argv } from "yargs";
import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
import { promisify } from "util";
import BigNumber from "bignumber.js";
import childProcess from "child_process";
import { existsSync, readFileSync, writeFileSync } from "fs";
import { promisify } from "util";
import { argv } from "yargs";

import { firstValueFrom, reduce } from "rxjs";
import { encodeAccountId, fromAccountRaw, toAccountRaw } from "../../account";
import { getAccountBridgeByFamily, getCurrencyBridge } from "../../bridge/impl";
import { liveConfig } from "../../config/sharedConfig";
import {
findCryptoCurrencyById,
getCryptoCurrencyById,
setSupportedCurrencies,
} from "../../currencies";
import { encodeAccountId, fromAccountRaw, toAccountRaw } from "../../account";
import { firstValueFrom, reduce } from "rxjs";
import { getAccountBridgeByFamily, getCurrencyBridge } from "../../bridge/impl";
import { MigrationAddress, migrationAddresses as defaultAddresses } from "./addresses";
import { liveConfig } from "../../config/sharedConfig";

// mandatory to run the script
setSupportedCurrencies([
Expand Down Expand Up @@ -99,6 +99,7 @@ setSupportedCurrencies([
"lukso",
"filecoin",
"linea",
"ton",
]);

LiveConfig.setConfig(liveConfig);
Expand Down

0 comments on commit 1b56c0a

Please sign in to comment.