Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: remove receipt coders #3551

Merged
merged 13 commits into from
Jan 6, 2025
5 changes: 5 additions & 0 deletions .changeset/shaggy-donkeys-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fuel-ts/transactions": minor
---

chore!: remove receipt coders
8 changes: 4 additions & 4 deletions packages/account/src/providers/utils/receipts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {
ReceiptTransfer,
ReceiptTransferOut,
} from '@fuel-ts/transactions';
import { ReceiptBurnCoder, ReceiptMessageOutCoder, ReceiptType } from '@fuel-ts/transactions';
import { getMintedAssetId, getMessageId, ReceiptType } from '@fuel-ts/transactions';
import { arrayify } from '@fuel-ts/utils';

import {
Expand Down Expand Up @@ -222,7 +222,7 @@ describe('assembleReceiptByType', () => {
const digest = MOCK_GQL_RECEIPT_FRAGMENT.digest;
const len = Number(MOCK_GQL_RECEIPT_FRAGMENT.len);

const messageId = ReceiptMessageOutCoder.getMessageId({
const messageId = getMessageId({
sender,
recipient,
nonce,
Expand All @@ -244,7 +244,7 @@ describe('assembleReceiptByType', () => {
it('should return a ReceiptMint when GqlReceiptType.Mint is provided', () => {
const contractId = MOCK_GQL_RECEIPT_FRAGMENT.id || '';
const subId = MOCK_GQL_RECEIPT_FRAGMENT.subId || '';
const assetId = ReceiptBurnCoder.getAssetId(contractId, subId);
const assetId = getMintedAssetId(contractId, subId);

const receipt = assembleReceiptByType({
...MOCK_GQL_RECEIPT_FRAGMENT,
Expand All @@ -263,7 +263,7 @@ describe('assembleReceiptByType', () => {
it('should return a ReceiptBurn when GqlReceiptType.Burn is provided', () => {
const contractId = MOCK_GQL_RECEIPT_FRAGMENT.id || '';
const subId = MOCK_GQL_RECEIPT_FRAGMENT.subId || '';
const assetId = ReceiptBurnCoder.getAssetId(contractId, subId);
const assetId = getMintedAssetId(contractId, subId);

const receipt = assembleReceiptByType({
...MOCK_GQL_RECEIPT_FRAGMENT,
Expand Down
309 changes: 0 additions & 309 deletions packages/transactions/src/coders/receipt.test.ts

This file was deleted.

Loading
Loading