@ledgerhq/live-common 34.52.0-nightly.4 → 34.52.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/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.js +7 -1
- package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/utils.js +5 -4
- package/lib/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib/families/hedera/utils.d.ts +2 -0
- package/lib/families/hedera/utils.d.ts.map +1 -0
- package/lib/families/hedera/{logic.js → utils.js} +2 -2
- package/lib/families/hedera/utils.js.map +1 -0
- package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.js +7 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.js +5 -4
- package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib-es/families/hedera/utils.d.ts +2 -0
- package/lib-es/families/hedera/utils.d.ts.map +1 -0
- package/lib-es/families/hedera/utils.js +3 -0
- package/lib-es/families/hedera/utils.js.map +1 -0
- package/package.json +35 -35
- package/src/bridge/generic-alpaca/getAccountShape.ts +8 -1
- package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +25 -2
- package/src/bridge/generic-alpaca/utils.test.ts +165 -0
- package/src/bridge/generic-alpaca/utils.ts +5 -4
- package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +222 -86
- package/src/families/hedera/utils.ts +2 -0
- package/lib/families/hedera/logic.d.ts +0 -2
- package/lib/families/hedera/logic.d.ts.map +0 -1
- package/lib/families/hedera/logic.js.map +0 -1
- package/lib-es/families/hedera/logic.d.ts +0 -2
- package/lib-es/families/hedera/logic.d.ts.map +0 -1
- package/lib-es/families/hedera/logic.js +0 -3
- package/lib-es/families/hedera/logic.js.map +0 -1
- package/src/families/hedera/logic.ts +0 -2
|
@@ -241,11 +241,12 @@ export const buildOptimisticOperation = (
|
|
|
241
241
|
const fees = BigInt(transaction.fees?.toString() || "0");
|
|
242
242
|
const { subAccountId } = transaction;
|
|
243
243
|
const { subAccounts } = account;
|
|
244
|
+
const parentType = subAccountId ? "FEES" : type;
|
|
244
245
|
|
|
245
246
|
const operation: Operation = {
|
|
246
|
-
id: encodeOperationId(account.id, "",
|
|
247
|
+
id: encodeOperationId(account.id, "", parentType),
|
|
247
248
|
hash: "",
|
|
248
|
-
type:
|
|
249
|
+
type: parentType,
|
|
249
250
|
value: subAccountId ? new BigNumber(fees.toString()) : transaction.amount, // match old behavior
|
|
250
251
|
fee: new BigNumber(fees.toString()),
|
|
251
252
|
blockHash: null,
|
|
@@ -266,9 +267,9 @@ export const buildOptimisticOperation = (
|
|
|
266
267
|
if (tokenAccount && subAccountId) {
|
|
267
268
|
operation.subOperations = [
|
|
268
269
|
{
|
|
269
|
-
id: `${subAccountId}
|
|
270
|
+
id: `${subAccountId}--${type}`,
|
|
270
271
|
hash: "",
|
|
271
|
-
type
|
|
272
|
+
type,
|
|
272
273
|
value: transaction.useAllAmount ? tokenAccount.balance : transaction.amount,
|
|
273
274
|
fee: new BigNumber(0),
|
|
274
275
|
blockHash: null,
|