Skip to content

Commit

Permalink
feat: better transaction detection
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Feb 23, 2024
1 parent 44890b5 commit 5b28427
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions src/handles/wallet.handles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,39 @@ export async function mountWalletRpcHandles() {
});

ipcMain.handle('walletGetCoinRecords', (_, options: any) => {
return wallet.getCoinRecords(options);
return wallet.getCoinRecords({
...options,
waitForWalletAvailability: false
});
});

ipcMain.handle(
'walletGetPrivateKey',
(_, getPrivateKeyResponse: GetPrivateKeyRequest, options: any) => {
return wallet.getPrivateKey(getPrivateKeyResponse, options);
return wallet.getPrivateKey(getPrivateKeyResponse, {
...options,
waitForWalletAvailability: false
});
},
);

ipcMain.handle(
'walletGetCoinRecordsByName',
(_, coinRecordsByNameRequest: CoinRecordsByNameRequest, options: any) => {
return wallet.getCoinRecordsByName(coinRecordsByNameRequest, options);
return wallet.getCoinRecordsByName(coinRecordsByNameRequest, {
...options,
waitForWalletAvailability: false
});
},
);

ipcMain.handle(
'walletGetSpendableCoins',
(_, spendableCoinRequest: SpendableCoinRequest, options?: any) => {
return wallet.getSpendableCoins(spendableCoinRequest, options);
return wallet.getSpendableCoins(spendableCoinRequest, {
...options,
waitForWalletAvailability: false
});
},
);

Expand All @@ -60,7 +72,10 @@ export async function mountWalletRpcHandles() {
);

ipcMain.handle('walletGetSyncStatus', (_, options: any) => {
return wallet.getSyncStatus(options);
return wallet.getSyncStatus({
...options,
waitForWalletAvailability: false
});
});

ipcMain.handle('walletGetWalletBalance', (_, options: any) => {
Expand Down

0 comments on commit 5b28427

Please sign in to comment.