-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tokens controller approve reject refactor #1261
Conversation
602ba37
to
308856f
Compare
@@ -74,7 +70,7 @@ export type SuggestedAssetMetaBase = { | |||
time: number; | |||
type: string; | |||
asset: Token; | |||
interactingAddress?: string; | |||
interactingAddress: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only place where this object is created is in the method watchAsset
and it uses:
interactingAddress: interactingAddress || selectedAddress
The value of selectedAddress
is defined as a string
, not string | undefined
, so this value is never undefined.
@@ -670,12 +663,10 @@ export class TokensController extends BaseController< | |||
): Promise<AssetSuggestionResult> { | |||
const { selectedAddress } = this.config; | |||
|
|||
const suggestedAssetMeta: SuggestedAssetMeta & { | |||
interactingAddress: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to force this into the type anymore due to the type change.
* stops calling approve and reject from controller
* stops calling approve and reject from controller
Description
Stops triggering the acceptance or rejection of the approval from within TokensController. That'll be the responsibility of the caller.
This is part of a series of tickets that aim to refactor and simplify how we await for the confirmation promise.
Changes
References
Checklist