Zondax / ledger-icp

Apache License 2.0
16 stars 9 forks source link

Show: "Stake Neuron" with ICRC #223

Closed lmuntaner closed 11 months ago

lmuntaner commented 11 months ago

For transfer, we show in the ledger device "Stake Neuron" when:

We would like to introduce the same logic for ICRC transfers.

Here are some test vectors. Most of them are the same as ICRC transfers, except the first four, which are stake neuron transactions.

icrc-stake-neuron.json.txt

I also introduced a new principal which has less than 29 bytes in some of these 4 new test vectors.

Script to create the test vectors.

:link: zboto Link

lmuntaner commented 11 months ago

@carlosala I looked into it and I can confirm that the same subaccount validation should be applied to staking with ICRC.

The code is the same to create the subaccount. What changes is the type.

I updated the test vectors in this issue. The first four transactions are stake neuron transaction with a valid subaccount.

I also updated the code in the script.

Thanks!