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

Remove transfer from IcrcTransferParams #3324

Merged
merged 1 commit into from
Sep 18, 2023
Merged

Remove transfer from IcrcTransferParams #3324

merged 1 commit into from
Sep 18, 2023

Conversation

dskloetd
Copy link
Contributor

Motivation

The type IcrcTransferParams is defined as

export interface IcrcTransferParams {
  to: IcrcAccount;
  amount: bigint;
  memo?: Uint8Array;
  fromSubAccount?: SubAccountArray;
  createdAt?: bigint;
  fee: bigint;
  transfer: (params: TransferParams) => Promise<IcrcBlockIndex>;
}

The field transfer is only used by executeIcrcTransfer and every other place where IcrcTransferParams is used, it's used as Omit<IcrcTransferParams, "transfer">.

Changes

Remove transfer from IcrcTransferParams and at it back only to the params of executeIcrcTransfer.

Tests

npm run build
npm run check
npm run test

All still pass.

Todos

  • Add entry to changelog (if necessary).
    not necessary

@dskloetd dskloetd marked this pull request as ready for review September 18, 2023 08:51
Copy link
Member

@peterpeterparker peterpeterparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@dskloetd dskloetd added this pull request to the merge queue Sep 18, 2023
Merged via the queue into main with commit 72c9748 Sep 18, 2023
38 checks passed
@dskloetd dskloetd deleted the kloet/omit-transfer branch September 18, 2023 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants