@ledgerhq/live-cli 24.27.0-nightly.9 → 24.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +25 -14
- package/package.json +3 -3
package/lib/cli.js
CHANGED
|
@@ -520289,7 +520289,7 @@ var require_package7 = __commonJS({
|
|
|
520289
520289
|
module2.exports = {
|
|
520290
520290
|
name: "@ledgerhq/live-common",
|
|
520291
520291
|
description: "Common ground for the Ledger Live apps",
|
|
520292
|
-
version: "34.52.0
|
|
520292
|
+
version: "34.52.0",
|
|
520293
520293
|
repository: {
|
|
520294
520294
|
type: "git",
|
|
520295
520295
|
url: "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -520624,7 +520624,7 @@ var require_package8 = __commonJS({
|
|
|
520624
520624
|
"package.json"(exports2, module2) {
|
|
520625
520625
|
module2.exports = {
|
|
520626
520626
|
name: "@ledgerhq/live-cli",
|
|
520627
|
-
version: "24.27.0
|
|
520627
|
+
version: "24.27.0",
|
|
520628
520628
|
description: "ledger-live CLI version",
|
|
520629
520629
|
repository: {
|
|
520630
520630
|
type: "git",
|
|
@@ -590985,7 +590985,7 @@ var cantonCoinTiers = [
|
|
|
590985
590985
|
var feeValue = (currency24) => config_default3.getCoinConfig(currency24).fee;
|
|
590986
590986
|
async function estimateFees(currency24, amount) {
|
|
590987
590987
|
const forcedValue = feeValue(currency24);
|
|
590988
|
-
if (forcedValue) {
|
|
590988
|
+
if (forcedValue !== void 0) {
|
|
590989
590989
|
return Promise.resolve(BigInt(forcedValue) * magnitude);
|
|
590990
590990
|
} else {
|
|
590991
590991
|
return Promise.resolve(
|
|
@@ -592464,10 +592464,8 @@ var getTransactionStatus6 = async (account3, transaction) => {
|
|
|
592464
592464
|
if (amount.gt(0) && estimatedFees.times(10).gt(amount)) {
|
|
592465
592465
|
warnings3.feeTooHigh = new FeeTooHigh();
|
|
592466
592466
|
}
|
|
592467
|
-
if (
|
|
592467
|
+
if (transaction.fee === null || transaction.fee === void 0) {
|
|
592468
592468
|
errors.fee = new FeeNotLoaded();
|
|
592469
|
-
} else if (transaction.fee.eq(0)) {
|
|
592470
|
-
errors.fee = new FeeRequired();
|
|
592471
592469
|
} else if (totalSpent.gt(account3.balance.minus(reserveAmount))) {
|
|
592472
592470
|
errors.amount = new NotEnoughSpendableBalance("", {
|
|
592473
592471
|
minimumAmount: formatCurrencyUnit(account3.currency.units[0], reserveAmount, {
|
|
@@ -592820,7 +592818,7 @@ function makeGetAccountShape3(signerContext4) {
|
|
|
592820
592818
|
const lockedAmount = new import_bignumber117.default(balancesData[`Locked${nativeInstrumentId}`]?.value.toString() || "0");
|
|
592821
592819
|
const totalBalance = unlockedAmount.plus(lockedAmount);
|
|
592822
592820
|
const reserveMin = new import_bignumber117.default(config_default3.getCoinConfig(currency24).minReserve || 0);
|
|
592823
|
-
const spendableBalance = import_bignumber117.default.max(0,
|
|
592821
|
+
const spendableBalance = import_bignumber117.default.max(0, totalBalance.minus(reserveMin));
|
|
592824
592822
|
const instrumentUtxoCounts = {};
|
|
592825
592823
|
for (const [instrumentId, balance2] of Object.entries(balancesData)) {
|
|
592826
592824
|
instrumentUtxoCounts[instrumentId] = balance2.utxoCount;
|
|
@@ -694598,7 +694596,7 @@ async function scanOperations(addresses, accountId2, afterValue = 1) {
|
|
|
694598
694596
|
hash: tx.transaction_id,
|
|
694599
694597
|
type: operationType,
|
|
694600
694598
|
value: myOutputAmount.minus(myInputAmount).absoluteValue(),
|
|
694601
|
-
fee: totalInputAmount.minus(totalOutputAmount),
|
|
694599
|
+
fee: inputs.length > 0 ? totalInputAmount.minus(totalOutputAmount) : (0, import_bignumber211.BigNumber)(0),
|
|
694602
694600
|
senders: inputs.map((inp) => inp.previous_outpoint_address),
|
|
694603
694601
|
recipients: outputs.map((output3) => output3.script_public_key_address),
|
|
694604
694602
|
blockHeight: tx.accepting_block_blue_score,
|
|
@@ -743605,7 +743603,17 @@ var preload6 = async (currency24) => {
|
|
|
743605
743603
|
await loadPolkadotCrypto();
|
|
743606
743604
|
await network_default2.getRegistry(currency24);
|
|
743607
743605
|
const minimumBondBalance = await network_default2.getMinimumBondBalance(currency24);
|
|
743608
|
-
|
|
743606
|
+
let currentStakingProgress;
|
|
743607
|
+
try {
|
|
743608
|
+
currentStakingProgress = await network_default2.getStakingProgress(currency24);
|
|
743609
|
+
} catch (e37) {
|
|
743610
|
+
currentStakingProgress = {
|
|
743611
|
+
electionClosed: true,
|
|
743612
|
+
activeEra: 0,
|
|
743613
|
+
maxNominatorRewardedPerValidator: 128,
|
|
743614
|
+
bondingDuration: 28
|
|
743615
|
+
};
|
|
743616
|
+
}
|
|
743609
743617
|
const { validators: previousValidators, staking: previousStakingProgress } = getCurrentPolkadotPreloadData();
|
|
743610
743618
|
let validators7 = previousValidators;
|
|
743611
743619
|
if (!validators7 || !validators7.length || shouldRefreshValidators(previousStakingProgress, currentStakingProgress)) {
|
|
@@ -744274,8 +744282,8 @@ var getAccountShape14 = async (info6) => {
|
|
|
744274
744282
|
balance: balance2,
|
|
744275
744283
|
currency: currencyToUse,
|
|
744276
744284
|
spendableBalance,
|
|
744277
|
-
operations: operations4,
|
|
744278
|
-
operationsCount: operations4.length,
|
|
744285
|
+
operations: shouldMigrate ? [] : operations4,
|
|
744286
|
+
operationsCount: shouldMigrate ? 0 : operations4.length,
|
|
744279
744287
|
blockHeight,
|
|
744280
744288
|
polkadotResources: {
|
|
744281
744289
|
nonce,
|
|
@@ -824445,7 +824453,8 @@ var cantonConfig = {
|
|
|
824445
824453
|
minReserve: 0,
|
|
824446
824454
|
useGateway: true,
|
|
824447
824455
|
networkType: "mainnet",
|
|
824448
|
-
nativeInstrumentId: "Amulet"
|
|
824456
|
+
nativeInstrumentId: "Amulet",
|
|
824457
|
+
fee: 0
|
|
824449
824458
|
}
|
|
824450
824459
|
},
|
|
824451
824460
|
config_currency_canton_network_devnet: {
|
|
@@ -824460,7 +824469,8 @@ var cantonConfig = {
|
|
|
824460
824469
|
minReserve: 0,
|
|
824461
824470
|
useGateway: true,
|
|
824462
824471
|
networkType: "devnet",
|
|
824463
|
-
nativeInstrumentId: "Amulet"
|
|
824472
|
+
nativeInstrumentId: "Amulet",
|
|
824473
|
+
fee: 0
|
|
824464
824474
|
}
|
|
824465
824475
|
},
|
|
824466
824476
|
config_currency_canton_network_testnet: {
|
|
@@ -824475,7 +824485,8 @@ var cantonConfig = {
|
|
|
824475
824485
|
minReserve: 0,
|
|
824476
824486
|
nativeInstrumentId: "Amulet",
|
|
824477
824487
|
useGateway: true,
|
|
824478
|
-
networkType: "testnet"
|
|
824488
|
+
networkType: "testnet",
|
|
824489
|
+
fee: 0
|
|
824479
824490
|
}
|
|
824480
824491
|
}
|
|
824481
824492
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/live-cli",
|
|
3
|
-
"version": "24.27.0
|
|
3
|
+
"version": "24.27.0",
|
|
4
4
|
"description": "ledger-live CLI version",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"ts-node": "10.9.2",
|
|
59
59
|
"tsup": "7.3.0",
|
|
60
60
|
"yaml": "2.8.1",
|
|
61
|
-
"@ledgerhq/types-cryptoassets": "^7.
|
|
62
|
-
"@ledgerhq/types-live": "^6.88.0
|
|
61
|
+
"@ledgerhq/types-cryptoassets": "^7.30.0",
|
|
62
|
+
"@ledgerhq/types-live": "^6.88.0"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"directory": "dist"
|