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

Type mismatch in XTC mint function Result #58

Open
tarek-eg opened this issue Aug 1, 2022 · 1 comment
Open

Type mismatch in XTC mint function Result #58

tarek-eg opened this issue Aug 1, 2022 · 1 comment

Comments

@tarek-eg
Copy link

tarek-eg commented Aug 1, 2022

Hello,
There's a mismatch in theTxReceipt of the mint function between the candid and the rust implementation
In Rust it's Nat and in candid it's Nat64

candid

type MintResult = variant {
    Ok : TransactionId;
    Err: MintError;
};
type TransactionId = nat64;

type TransactionId = nat64;

Rust implementation

pub type TxReceipt = Result<Nat, TxError>;

pub async fn mint(to: Principal, _amount: Nat) -> TxReceipt {

@tarek-eg
Copy link
Author

tarek-eg commented Aug 1, 2022

This is causing an issue when I try to decode it using agentjs IDL.decode
type mismatch: type on the wire nat, expect type nat64

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

No branches or pull requests

1 participant