From 5b28427327632d3f7da9e38c67fe60fbdaf69bdf Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Fri, 23 Feb 2024 12:40:41 -0500 Subject: [PATCH] feat: better transaction detection --- src/handles/wallet.handles.ts | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/handles/wallet.handles.ts b/src/handles/wallet.handles.ts index a075406..9369a2b 100644 --- a/src/handles/wallet.handles.ts +++ b/src/handles/wallet.handles.ts @@ -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 + }); }, ); @@ -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) => {