dfinity / cycles-wallet

DFINITY Cycles Wallet
Apache License 2.0
55 stars 30 forks source link

Bug: Inconsistent (or too subtle) typing of wallet's `wallet_receive` and destination of wallet_send's `wallet_receive` #87

Closed crusso closed 2 years ago

crusso commented 3 years ago

Trying to extend Lisa's hello_cycles example, I noticed that the typing of

lib:did

Wallet.wallet_receive : () -> ()

and (the implicitly expected type) of the principal in wallet_send are different:

wallet_receive : () -> variant { Ok : null; Err: Text};

Unless we are relying on funky properties of subtyping, that would mean that you can't send cycles to another wallet as the types don't match up.

Is that intentional or a bug?

Related to #50

crusso commented 3 years ago

(@hansl @chenyan-dfinity @p-shahi)

adamspofford-dfinity commented 2 years ago

Resolved in #130 - arbitrary functions named wallet_receive are no longer called by the wallet.