From c76bb4f40c2c20d8e36a0538ec4203e1c1e9fd0a Mon Sep 17 00:00:00 2001 From: Torres-ssf Date: Mon, 14 Aug 2023 13:45:50 -0300 Subject: [PATCH] fix method name --- packages/providers/src/utils/receipts.test.ts | 4 ++-- packages/providers/src/utils/receipts.ts | 4 ++-- packages/transactions/src/coders/receipt.ts | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/providers/src/utils/receipts.test.ts b/packages/providers/src/utils/receipts.test.ts index 79b7e291d83..ce8fdf9d113 100644 --- a/packages/providers/src/utils/receipts.test.ts +++ b/packages/providers/src/utils/receipts.test.ts @@ -204,7 +204,7 @@ describe('assembleReceiptByType', () => { it('should return a ReceiptMint when GqlReceiptType.Mint is provided', () => { const contractId = MOCK_GQL_RECEIPT_FRAGMENT.contract?.id || ''; const subId = MOCK_GQL_RECEIPT_FRAGMENT.subId || ''; - const assetId = ReceiptBurnCoder.getMessageId(contractId, subId); + const assetId = ReceiptBurnCoder.getAssetId(contractId, subId); const receipt = assembleReceiptByType({ ...MOCK_GQL_RECEIPT_FRAGMENT, @@ -223,7 +223,7 @@ describe('assembleReceiptByType', () => { it('should return a ReceiptBurn when GqlReceiptType.Burn is provided', () => { const contractId = MOCK_GQL_RECEIPT_FRAGMENT.contract?.id || ''; const subId = MOCK_GQL_RECEIPT_FRAGMENT.subId || ''; - const assetId = ReceiptBurnCoder.getMessageId(contractId, subId); + const assetId = ReceiptBurnCoder.getAssetId(contractId, subId); const receipt = assembleReceiptByType({ ...MOCK_GQL_RECEIPT_FRAGMENT, diff --git a/packages/providers/src/utils/receipts.ts b/packages/providers/src/utils/receipts.ts index 29cd52d4468..909163fefa3 100644 --- a/packages/providers/src/utils/receipts.ts +++ b/packages/providers/src/utils/receipts.ts @@ -234,7 +234,7 @@ export function assembleReceiptByType(receipt: GqlReceiptFragmentFragment) { case GqlReceiptType.Mint: { const contractId = hexOrZero(receipt.contract?.id); const subId = hexOrZero(receipt.subId); - const assetId = ReceiptMintCoder.getMessageId(contractId, subId); + const assetId = ReceiptMintCoder.getAssetId(contractId, subId); const mintReceipt: ReceiptMint = { type: ReceiptType.Mint, @@ -252,7 +252,7 @@ export function assembleReceiptByType(receipt: GqlReceiptFragmentFragment) { case GqlReceiptType.Burn: { const contractId = hexOrZero(receipt.contract?.id); const subId = hexOrZero(receipt.subId); - const assetId = ReceiptBurnCoder.getMessageId(contractId, subId); + const assetId = ReceiptBurnCoder.getAssetId(contractId, subId); const burnReceipt: ReceiptBurn = { type: ReceiptType.Burn, diff --git a/packages/transactions/src/coders/receipt.ts b/packages/transactions/src/coders/receipt.ts index c79273f6e49..2dedb33dbb3 100644 --- a/packages/transactions/src/coders/receipt.ts +++ b/packages/transactions/src/coders/receipt.ts @@ -779,7 +779,7 @@ export class ReceiptMintCoder extends Coder { super('ReceiptMint', 'struct ReceiptMint', 0); } - static getMessageId(contractId: string, subId: string): string { + static getAssetId(contractId: string, subId: string): string { return getAssetIdForMintAndBurnReceipts(contractId, subId); } @@ -810,7 +810,7 @@ export class ReceiptMintCoder extends Coder { [decoded, o] = new U64Coder().decode(data, o); const is = decoded; - const assetId = ReceiptMintCoder.getMessageId(contractId, subId); + const assetId = ReceiptMintCoder.getAssetId(contractId, subId); const receiptMint: ReceiptMint = { type: ReceiptType.Mint, @@ -847,7 +847,7 @@ export class ReceiptBurnCoder extends Coder { super('ReceiptBurn', 'struct ReceiptBurn', 0); } - static getMessageId(contractId: string, subId: string): string { + static getAssetId(contractId: string, subId: string): string { return getAssetIdForMintAndBurnReceipts(contractId, subId); } @@ -878,7 +878,7 @@ export class ReceiptBurnCoder extends Coder { [decoded, o] = new U64Coder().decode(data, o); const is = decoded; - const assetId = ReceiptMintCoder.getMessageId(contractId, subId); + const assetId = ReceiptMintCoder.getAssetId(contractId, subId); const receiptBurn: ReceiptBurn = { type: ReceiptType.Burn,