givelotus / lotus-vase

A simple reference wallet for Lotus which supports mobile devices.
GNU General Public License v3.0
4 stars 2 forks source link

Fix send/receive keyboard <-> wallet bridge #169

Open schancel opened 3 years ago

schancel commented 3 years ago

Currently, we want to display XPI in the keypad but the synchronization between the need for sats in the wallet and the need for XPI in the sendmodel and keyboard means that there's some multiplication/division that needs to be done. Originally, both places used sats. The interim solution is to multiple by 1000000 on read -- however when this ends up fed back into the keyboard and payment display it is 1000000 * Amount XPI. The current handling of how data is transferred up and down between the keyboard and the wallet functionality seems very kludgy and is making fixing this in a holistic way unclear.