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

feat(signer): support ledgers that do not implement ICRC-21 #4082

Merged
merged 11 commits into from
Jan 9, 2025

Conversation

peterpeterparker
Copy link
Member

@peterpeterparker peterpeterparker commented Jan 6, 2025

Motivation

We were requested to generate a consent message similar to the one used by the ledger for cases where the ICRC-21 implementation is missing. This if the targeted methods is either icrc1_transfer, icrc2_approve, or icrc2_transfer_from.

Notes

The ICRC-49 standard specifies that a user should be warned when a consent message is interpreted on the frontend side instead of being retrieved through a canister.
See https://github.com/dfinity/wg-identity-authentication/blob/main/topics/icrc_49_call_canister.md#message-processing

Changes

  • Bump @dfinity/[email protected] which implements the requirement (see release notes v0.1.0 and v0.1.1)
  • Adapt consent message interpretation breaking change.
  • Display warning message.

Tests

I did not test with OISY.

Screenshot

Capture d’écran 2025-01-08 à 10 36 57

@peterpeterparker peterpeterparker changed the title feat: support ledgers that do not implement ICRC-21 feat(signer): support ledgers that do not implement ICRC-21 Jan 6, 2025
@peterpeterparker peterpeterparker marked this pull request as ready for review January 9, 2025 13:53
@peterpeterparker peterpeterparker requested a review from a team as a code owner January 9, 2025 13:53
Copy link
Collaborator

@AntonioVentilii AntonioVentilii left a comment

Choose a reason for hiding this comment

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

LGTM tks!

One small doubt, not a request for action

@peterpeterparker peterpeterparker enabled auto-merge (squash) January 9, 2025 14:15
@peterpeterparker peterpeterparker merged commit 1691f02 into main Jan 9, 2025
22 checks passed
@peterpeterparker peterpeterparker deleted the feat/consent-message-build branch January 9, 2025 14:18
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