diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c1f358e..ec8ce946 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- added: A `transactionsRemoved` event on `EdgeCurrencyWallet`. + ## 2.29.0 (2025-05-26) - added: Add `getTokenDetails` to currency tools diff --git a/src/core/currency/wallet/currency-wallet-api.ts b/src/core/currency/wallet/currency-wallet-api.ts index 475882a2..55a9f02b 100644 --- a/src/core/currency/wallet/currency-wallet-api.ts +++ b/src/core/currency/wallet/currency-wallet-api.ts @@ -1,7 +1,7 @@ import { abs, div, lt, mul } from 'biggystring' import { Disklet } from 'disklet' import { base64 } from 'rfc4648' -import { bridgifyObject, onMethod, watchMethod } from 'yaob' +import { bridgifyObject, emit, onMethod, watchMethod } from 'yaob' import { InternalWalletMethods, @@ -719,6 +719,7 @@ export function makeCurrencyWalletApi( payload: { walletId: input.props.walletId } }) await engine.resyncBlockchain() + emit(out, 'transactionsRemoved', undefined) }, // URI handling: diff --git a/src/types/types.ts b/src/types/types.ts index bd570817..9175f371 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -1190,6 +1190,16 @@ export interface EdgeCurrencyWalletEvents { enabledDetectedTokens: string[] newTransactions: EdgeTransaction[] transactionsChanged: EdgeTransaction[] + + /** + * Something has removed transactions, + * so the GUI should refresh the transaction list. + * + * We may pass dropped txid's as `string[]` in the future. + * A missing array means "check everything", such with resync. + */ + transactionsRemoved: void + wcNewContractCall: JsonObject }