diff --git a/src/chrome/dev-tools/components/WalletSimulator.tsx b/src/chrome/dev-tools/components/WalletSimulator.tsx index b86bdfaa..44a2a45a 100644 --- a/src/chrome/dev-tools/components/WalletSimulator.tsx +++ b/src/chrome/dev-tools/components/WalletSimulator.tsx @@ -11,6 +11,8 @@ import { getSignEd25519TransactionPayload, getSignSecp256k1TransactionPayload, getDeriveAndDisplayPayload, + getRejectAccountListRequestPayload, + getAccountListResponsePayload, } from '../example' import { getExtensionOptions } from 'options' import { getConnections } from 'chrome/helpers/get-connections' @@ -31,6 +33,8 @@ export const WalletSimulator = () => { 'Sign TX (Curve25519)': getSignEd25519TransactionPayload(), 'Sign Auth (Curve25519)': getSignEd222519ChallengePayload(), 'Sign Auth (Secp256k1)': getSignSecp256k1ChallengePayload(), + 'Reject Account List Request': getRejectAccountListRequestPayload(), + 'Account List Response': getAccountListResponsePayload(), } useEffect(() => { @@ -67,7 +71,7 @@ export const WalletSimulator = () => { }) getConnections().map((connections) => { - const firstConnection = connections && connections?.[0] + const firstConnection = connections && Object.values(connections)[0] if (firstConnection) { connectorClient.setConnectionPassword( Buffer.from(firstConnection.password, 'hex'), diff --git a/src/chrome/dev-tools/example.ts b/src/chrome/dev-tools/example.ts index 2028efa1..457e27b6 100644 --- a/src/chrome/dev-tools/example.ts +++ b/src/chrome/dev-tools/example.ts @@ -128,3 +128,25 @@ export const getSignSecp256k1ChallengePayload = () => derivationPath: 'm/44H/1022H/10H/525H/1238H', }, ]) + + export const getRejectAccountListRequestPayload = () => { + return { + interactionId: '', + discriminator: 'accountListRejectedResponse', + } + } + + export const getAccountListResponsePayload = () => { + return { + interactionId: '', + discriminator: 'accountListResponse', + accounts: [ + { + label: 'Account 1', + address: + 'account_rdx12y4l35lh2543nff9pyyzvsh64ssu0dv6fq20gg8suslwmjvkylejgj', + appearanceId: 0, + }, + ], + } + } \ No newline at end of file