From 9db60542901a93fbddea149ca39b4d0006a84d42 Mon Sep 17 00:00:00 2001 From: lbqds Date: Mon, 18 Nov 2024 17:38:20 +0800 Subject: [PATCH] Fix serialization issue in alephium provider --- .../onekey-alph-provider/src/OnekeyAlphProvider.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/providers/onekey-alph-provider/src/OnekeyAlphProvider.ts b/packages/providers/onekey-alph-provider/src/OnekeyAlphProvider.ts index 70cf0b36..a2125c93 100644 --- a/packages/providers/onekey-alph-provider/src/OnekeyAlphProvider.ts +++ b/packages/providers/onekey-alph-provider/src/OnekeyAlphProvider.ts @@ -148,9 +148,16 @@ export class ProviderAlph extends InteractiveSignerProvider implements AlephiumW if (options.onDisconnected) { this.onDisconnected = options.onDisconnected } + const params: Record = {}; + Object.keys(options).forEach((key) => { + if (options[key as keyof EnableOptions] instanceof Function) { + return; + } + params[key] = options[key as keyof EnableOptions]; + }) return this.bridgeRequest({ method: 'enableIfConnected', - params: options, + params, }) as Promise; }