mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +01:00
FIX: Only send wallets to watch app if installed
This commit is contained in:
parent
84b78da934
commit
ce0002a0f9
1 changed files with 92 additions and 89 deletions
|
@ -51,6 +51,8 @@ const WatchConnectivity = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
WatchConnectivity.sendWalletsToWatch = () => {
|
WatchConnectivity.sendWalletsToWatch = () => {
|
||||||
|
getIsWatchAppInstalled().then(installed => {
|
||||||
|
if (!installed) return;
|
||||||
const BlueApp = require('./BlueApp');
|
const BlueApp = require('./BlueApp');
|
||||||
const allWallets = BlueApp.getWallets();
|
const allWallets = BlueApp.getWallets();
|
||||||
if (!Array.isArray(allWallets)) {
|
if (!Array.isArray(allWallets)) {
|
||||||
|
@ -156,6 +158,7 @@ WatchConnectivity.sendWalletsToWatch = () => {
|
||||||
updateApplicationContext({ wallets, randomID: Math.floor(Math.random() * 11) });
|
updateApplicationContext({ wallets, randomID: Math.floor(Math.random() * 11) });
|
||||||
return { wallets };
|
return { wallets };
|
||||||
});
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
export default WatchConnectivity;
|
export default WatchConnectivity;
|
||||||
WatchConnectivity();
|
WatchConnectivity();
|
||||||
|
|
Loading…
Add table
Reference in a new issue