@@ -2,7 +2,7 @@ import type {
22 AmountValue ,
33 ExtensionState ,
44 GrantDetails ,
5- PopupTransientState ,
5+ TransientState ,
66 Storage ,
77 StorageKey ,
88 WalletAmount ,
@@ -48,7 +48,7 @@ export class StorageService {
4848 // used as an optimization/cache
4949 private currentState : Storage [ 'state' ] | null = null ;
5050
51- private popupTransientState : PopupTransientState = { } ;
51+ private transientState : TransientState = { } ;
5252
5353 constructor ( { browser, events } : Cradle ) {
5454 Object . assign ( this , { browser, events } ) ;
@@ -211,19 +211,19 @@ export class StorageService {
211211 this . events . emit ( 'storage.rate_of_pay_update' , { rate } ) ;
212212 }
213213
214- setPopupTransientState < T extends keyof PopupTransientState > (
214+ setTransientState < T extends keyof TransientState > (
215215 id : T ,
216- update : ( prev ?: PopupTransientState [ T ] ) => PopupTransientState [ T ] ,
216+ update : ( prev ?: TransientState [ T ] ) => TransientState [ T ] ,
217217 ) {
218- const newState = update ( this . popupTransientState [ id ] ) ;
219- this . popupTransientState [ id ] = newState ;
218+ const newState = update ( this . transientState [ id ] ) ;
219+ this . transientState [ id ] = newState ;
220220
221- const state = this . getPopupTransientState ( ) ;
222- this . events . emit ( 'storage.popup_transient_state_update ' , state ) ;
221+ const state = this . getTransientState ( ) ;
222+ this . events . emit ( 'storage.transient_state_update ' , state ) ;
223223 }
224224
225- getPopupTransientState ( ) : PopupTransientState {
226- return this . popupTransientState ;
225+ getTransientState ( ) : TransientState {
226+ return this . transientState ;
227227 }
228228}
229229
0 commit comments