UNPKG

@ledgerhq/coin-hedera

Version:
104 lines 3.71 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.dataset = exports.hedera = void 0; const errors_1 = require("@ledgerhq/errors"); const transaction_1 = require("../transaction"); // eslint-disable-next-line @typescript-eslint/no-unused-vars exports.hedera = { scanAccounts: [ { name: "hedera seed 1", apdus: ` => e002010009000000002c00000bd6 <= 9e92a312233d5fd6b5a723875aeea2cea81a8e48ffc00341cff6dffcfd3ab7f29000 `, }, ], accounts: [ { FIXME_tests: ["balance is sum of ops"], raw: { id: `js:2:hedera:0.0.751515:`, seedIdentifier: "", name: "Hedera 1", derivationMode: "hederaBip44", index: 0, freshAddress: "0.0.751515", freshAddressPath: "44/3030/0/0/0", blockHeight: 0, operations: [], pendingOperations: [], currencyId: "hedera", lastSyncDate: "", balance: "0", }, transactions: [ { name: "Recipient and sender must not be the same", transaction: (0, transaction_1.fromTransactionRaw)({ family: "hedera", recipient: "0.0.751515", amount: "100000000", }), expectedStatus: { errors: { recipient: new errors_1.InvalidAddressBecauseDestinationIsAlsoSource(), }, warnings: {}, }, }, { name: "Amount Required", transaction: (0, transaction_1.fromTransactionRaw)({ family: "hedera", recipient: "0.0.751515", amount: "0", }), expectedStatus: { errors: { amount: new errors_1.AmountRequired(), }, warnings: {}, }, }, { name: "Not enough balance", transaction: (0, transaction_1.fromTransactionRaw)({ family: "hedera", recipient: "0.0.751515", amount: "1000000000000000", }), expectedStatus: { errors: { amount: new errors_1.NotEnoughBalance(), }, warnings: {}, }, }, { name: "Send max", transaction: (0, transaction_1.fromTransactionRaw)({ family: "hedera", recipient: "0.0.751515", amount: "1000000000000000", useAllAmount: true, }), expectedStatus: (account, _, status) => { return { amount: account.balance.minus(status.estimatedFees), errors: {}, warnings: {}, }; }, }, ], }, ], }; exports.dataset = { implementations: ["js"], currencies: { hedera: exports.hedera, }, }; //# sourceMappingURL=bridgeDatasetTest.js.map