File tree 3 files changed +23
-4
lines changed 3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
5
+ - changed: Extended ` onSubscribeAddresses ` callback to optionally include checkpoints.
5
6
- fixed: Disabling pin-login while in duress mode disables pin-login for the main login.
6
7
- fixed: ` loginWithPassword ` bug disabled duress mode when doing an online login.
7
8
- fixed: Properly fake duress mode settings while in duress mode.
Original file line number Diff line number Diff line change @@ -291,14 +291,27 @@ export function makeCurrencyWalletCallbacks(
291
291
} )
292
292
} ,
293
293
294
- onSubscribeAddresses ( addresses : string [ ] ) {
294
+ onSubscribeAddresses (
295
+ paramsOrAddresses :
296
+ | Array < { address : string ; checkpoint ?: string } >
297
+ | string [ ]
298
+ ) {
299
+ const params = paramsOrAddresses . map ( param =>
300
+ typeof param === 'string'
301
+ ? {
302
+ address : param ,
303
+ checkpoint : undefined
304
+ }
305
+ : param
306
+ )
295
307
const changeServiceSubscriptions =
296
308
input . props . state . currency . wallets [ walletId ] . changeServiceSubscriptions
297
309
const subscriptions : ChangeServiceSubscription [ ] = [
298
310
...changeServiceSubscriptions ,
299
- ...addresses . map ( address => ( {
311
+ ...params . map ( ( { address, checkpoint } ) => ( {
300
312
address,
301
- status : 'subscribing' as const
313
+ status : 'subscribing' as const ,
314
+ checkpoint
302
315
} ) )
303
316
]
304
317
// TODO: We currently have no way to remove addresses from this list.
Original file line number Diff line number Diff line change @@ -918,7 +918,12 @@ export interface EdgeCurrencyEngineCallbacks {
918
918
readonly onNewTokens : ( tokenIds : string [ ] ) => void
919
919
readonly onSeenTxCheckpoint : ( checkpoint : string ) => void
920
920
readonly onStakingStatusChanged : ( status : EdgeStakingStatus ) => void
921
- readonly onSubscribeAddresses : ( addresses : string [ ] ) => void
921
+ readonly onSubscribeAddresses : (
922
+ paramsOrAddresses :
923
+ | Array < { address : string ; checkpoint ?: string } >
924
+ /** @deprecated Use the array of param objects instead. */
925
+ | string [ ]
926
+ ) => void
922
927
readonly onTokenBalanceChanged : (
923
928
tokenId : EdgeTokenId ,
924
929
balance : string
You can’t perform that action at this time.
0 commit comments