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: build icrc1_transfer consent message if target does not implement ICRC-21 #360

Open
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

peterpeterparker
Copy link
Member

@peterpeterparker peterpeterparker commented Dec 21, 2024

Motivation

We were requested to extend the library to build ICRC-21 pseudo content message for icrc1_transfer as if they were generated by a target canister because some ledgers and canisters might not have implemented those specifications.

Changes

  • Add a constants to map the methods to the custom builder. Currently only icrc1_transfer.
  • Implement logic in service:
    • If call consent message fails
    • Check if there is a mapping for the method with a builder
    • If yes, fetch the token metadata
    • Finally build the markdown as it was a consent info response

@peterpeterparker peterpeterparker marked this pull request as ready for review December 25, 2024 06:25
@peterpeterparker peterpeterparker requested a review from a team as a code owner December 25, 2024 06:25
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.

1 participant