Skip to content

Commit

Permalink
Rethrow error
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederikBolding committed Nov 7, 2024
1 parent bb9122e commit 4df9cb2
Showing 1 changed file with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,26 @@ export class MultichainRoutingController extends BaseController<
chainId: CaipChainId,
request: JsonRpcRequest,
) {
const result = (await this.messagingSystem.call(
'SnapController:handleRequest',
{
snapId,
origin: 'metamask',
request: {
method: '',
params: {
chainId,
request,
try {
const result = (await this.messagingSystem.call(
'SnapController:handleRequest',
{
snapId,
origin: 'metamask',
request: {
method: '',
params: {
chainId,
request,
},
},
handler: HandlerType.OnProtocolRequest, // TODO: Export and request format
},
handler: HandlerType.OnProtocolRequest, // TODO: Export and request format
},
)) as { address: string } | null;
return result?.address;
)) as { address: string } | null;
return result?.address;
} catch {
throw rpcErrors.internal();
}
}

async #getAccountSnap(
Expand Down

0 comments on commit 4df9cb2

Please sign in to comment.