Skip to content

Commit

Permalink
fix method name
Browse files Browse the repository at this point in the history
  • Loading branch information
Torres-ssf committed Aug 14, 2023
1 parent 05171fb commit c76bb4f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/providers/src/utils/receipts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions packages/providers/src/utils/receipts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions packages/transactions/src/coders/receipt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ export class ReceiptMintCoder extends Coder<ReceiptMint, ReceiptMint> {
super('ReceiptMint', 'struct ReceiptMint', 0);
}

static getMessageId(contractId: string, subId: string): string {
static getAssetId(contractId: string, subId: string): string {
return getAssetIdForMintAndBurnReceipts(contractId, subId);
}

Expand Down Expand Up @@ -810,7 +810,7 @@ export class ReceiptMintCoder extends Coder<ReceiptMint, ReceiptMint> {
[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,
Expand Down Expand Up @@ -847,7 +847,7 @@ export class ReceiptBurnCoder extends Coder<ReceiptBurn, ReceiptBurn> {
super('ReceiptBurn', 'struct ReceiptBurn', 0);
}

static getMessageId(contractId: string, subId: string): string {
static getAssetId(contractId: string, subId: string): string {
return getAssetIdForMintAndBurnReceipts(contractId, subId);
}

Expand Down Expand Up @@ -878,7 +878,7 @@ export class ReceiptBurnCoder extends Coder<ReceiptBurn, ReceiptBurn> {
[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,
Expand Down

0 comments on commit c76bb4f

Please sign in to comment.