Skip to content

Commit

Permalink
fix old utxos check
Browse files Browse the repository at this point in the history
  • Loading branch information
arobsn committed Aug 2, 2024
1 parent f144d10 commit e5dfbe9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/chains/ergo/services/graphQlService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ class GraphQLService {
}

async checkBoxesOlderThan(height: number, addresses: string[]): Promise<boolean> {
if (isEmpty(addresses)) return false;

const query = gql`
query Boxes($maxHeight: Int, $addresses: [String!]) {
boxes(
Expand Down
3 changes: 1 addition & 2 deletions src/stores/walletStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,6 @@ export const useWalletStore = defineStore("wallet", () => {
if (Date.now() - privateState.lastSynced < MIN_SYNC_INTERVAL) return setSyncing(false);
setSyncing(true);

checkOldUtxos();

const walletId = privateState.id;
const deriver = hdKeyPool.get(privateState.publicKey);
const addressesChunks = [] as IDbAddress[][];
Expand Down Expand Up @@ -369,6 +367,7 @@ export const useWalletStore = defineStore("wallet", () => {
privateState.patchAssets(changedAssets, removedAssets);
privateState.lastSynced = Date.now();

checkOldUtxos();
setSyncing(false);
}

Expand Down

0 comments on commit e5dfbe9

Please sign in to comment.