diff --git a/app/scripts/controllers/mmi-controller.js b/app/scripts/controllers/mmi-controller.js index 8923487b5..0ed4deaae 100644 --- a/app/scripts/controllers/mmi-controller.js +++ b/app/scripts/controllers/mmi-controller.js @@ -442,25 +442,8 @@ export default class MMIController extends EventEmitter { return keyring.getTransactionDeepLink(from, custodyTxId); } - async getCustodianToken(custodianType) { - let currentCustodyType; - - const address = this.preferencesController.getSelectedAddress(); - - if (!custodianType) { - const resultCustody = this.custodyController.getCustodyTypeByAddress( - toChecksumHexAddress(address), - ); - currentCustodyType = resultCustody; - } - let keyring = await this.keyringController.getKeyringsByType( - currentCustodyType || `Custody - ${custodianType}`, - )[0]; - if (!keyring) { - keyring = await this.keyringController.addNewKeyring( - currentCustodyType || `Custody - ${custodianType}`, - ); - } + async getCustodianToken(address) { + const keyring = await this.keyringController.getKeyringForAccount(address); const { authDetails } = keyring.getAccountDetails(address); return keyring ? authDetails.jwt || authDetails.refreshToken : ''; } diff --git a/ui/components/component-library/checkbox/__snapshots__/checkbox.test.tsx.snap b/ui/components/component-library/checkbox/__snapshots__/checkbox.test.tsx.snap index 5df6da8de..90c0f27f5 100644 --- a/ui/components/component-library/checkbox/__snapshots__/checkbox.test.tsx.snap +++ b/ui/components/component-library/checkbox/__snapshots__/checkbox.test.tsx.snap @@ -3,7 +3,7 @@ exports[`Checkbox should render the Checkbox without crashing 1`] = `