You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #417: Introduce WalletModel and loadWallet functionality
50c5f87 qml: Protect m_wallets in WalletQmlController with QMutex (johnny9)
ec3e68e qml: Move setSelectedWallet work to worker QThread (johnny9)
b41a0e4 qml: Introduce WalletModel and loadWallet functionality (johnny9)
Pull request description:
When a user selects a wallet from the WalletSelect menu the wallet controller can now load the wallet data in and the name and balance will appear in the WalletBadge
The WalletQmlModel is introduced that hodes the interface to the backend wallet and provides the balance to the gui as a formatted string. The formatted string isn't quite as nice as specified in the figma. Instead it just uses the satoshi formatting currently provided by our GUI utils. The advanced formatting will be added as its own PR so that it can be reviewed separately.
WalletController has been renamed to WalletQmlController to not conflict with the qt widgets controller. A function to set the selected wallet has been added. This function loads or creates the backend wallet interface and a WalletQmlModel owns the interface and is set to the controller's selectedWallet property. This is how the gui will gain access to the wallet's information.
Loading encrypted wallets is not currently handled as we need additional dialogs. This will be done in a separate PR so that it can be reviewed independantly.
A handler is also added to the wallet controller to handle background loading of wallet either through the rpc interface or at startup.
Initial state and loading states of the wallet selector have not been implemented yet and will be done separately so it currently will just show 0 balance until a wallet is properly loaded.
ACKs for top commit:
jarolrod:
ACK 50c5f87
Tree-SHA512: d03d3ffd37122e80b37c3e4dfb1b27910afd358b174970ba326f66ca24a8e623c758e12cf63edd7b62de6926117011e8cb8a21d69a8a8e32a1776136d892b072
0 commit comments