@ledgerhq/live-cli 24.25.0-nightly.4 → 24.25.0-nightly.5
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 +30 -5
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -513744,7 +513744,7 @@ var require_package7 = __commonJS({
|
|
|
513744
513744
|
module2.exports = {
|
|
513745
513745
|
name: "@ledgerhq/live-common",
|
|
513746
513746
|
description: "Common ground for the Ledger Live apps",
|
|
513747
|
-
version: "34.50.0-nightly.
|
|
513747
|
+
version: "34.50.0-nightly.5",
|
|
513748
513748
|
repository: {
|
|
513749
513749
|
type: "git",
|
|
513750
513750
|
url: "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -514081,7 +514081,7 @@ var require_package8 = __commonJS({
|
|
|
514081
514081
|
"package.json"(exports2, module2) {
|
|
514082
514082
|
module2.exports = {
|
|
514083
514083
|
name: "@ledgerhq/live-cli",
|
|
514084
|
-
version: "24.25.0-nightly.
|
|
514084
|
+
version: "24.25.0-nightly.5",
|
|
514085
514085
|
description: "ledger-live CLI version",
|
|
514086
514086
|
repository: {
|
|
514087
514087
|
type: "git",
|
|
@@ -847223,7 +847223,16 @@ async function listOperations9(address3, { token, limit, sort, minHeight }) {
|
|
|
847223
847223
|
const limitedOperations = limit ? operations4.slice(0, limit) : operations4;
|
|
847224
847224
|
const lastOperation = limitedOperations.at(-1);
|
|
847225
847225
|
const nextToken = lastOperation ? JSON.stringify(lastOperation?.id) : "";
|
|
847226
|
-
const filteredOperations = limitedOperations.filter((op) => isAPITransactionType(op) || isAPIDelegationType(op) || isAPIRevealType(op)).
|
|
847226
|
+
const filteredOperations = limitedOperations.filter((op) => isAPITransactionType(op) || isAPIDelegationType(op) || isAPIRevealType(op)).filter((op) => {
|
|
847227
|
+
const hasFailed = op.status !== "applied";
|
|
847228
|
+
if (hasFailed && isAPITransactionType(op)) {
|
|
847229
|
+
const isIn = op.target?.address === address3;
|
|
847230
|
+
if (isIn) {
|
|
847231
|
+
return false;
|
|
847232
|
+
}
|
|
847233
|
+
}
|
|
847234
|
+
return true;
|
|
847235
|
+
}).map((op) => convertOperation(address3, op)).flat();
|
|
847227
847236
|
const sortedOperations = filteredOperations.sort((a65, b20) => b20.tx.date.getTime() - a65.tx.date.getTime());
|
|
847228
847237
|
return [sortedOperations, nextToken];
|
|
847229
847238
|
}
|
|
@@ -847901,8 +847910,24 @@ function transactionToIntent(account3, transaction, computeIntentType2) {
|
|
|
847901
847910
|
return res;
|
|
847902
847911
|
}
|
|
847903
847912
|
var buildOptimisticOperation20 = (account3, transaction, sequenceNumber) => {
|
|
847904
|
-
|
|
847905
|
-
|
|
847913
|
+
let type4;
|
|
847914
|
+
switch (transaction.mode) {
|
|
847915
|
+
case "changeTrust":
|
|
847916
|
+
type4 = "OPT_IN";
|
|
847917
|
+
break;
|
|
847918
|
+
case "delegate":
|
|
847919
|
+
case "stake":
|
|
847920
|
+
type4 = "DELEGATE";
|
|
847921
|
+
break;
|
|
847922
|
+
case "undelegate":
|
|
847923
|
+
case "unstake":
|
|
847924
|
+
type4 = "UNDELEGATE";
|
|
847925
|
+
break;
|
|
847926
|
+
default:
|
|
847927
|
+
type4 = "OUT";
|
|
847928
|
+
break;
|
|
847929
|
+
}
|
|
847930
|
+
const fees2 = BigInt(transaction.fees?.toString() || "0");
|
|
847906
847931
|
const { subAccountId } = transaction;
|
|
847907
847932
|
const { subAccounts } = account3;
|
|
847908
847933
|
const operation = {
|