Send requests with other wallet returns an error

Hi, I wrote GSN request and it works perfectly with Metamask but when I try using other wallets like torus, fortmatic, it returns an error.

How can I solve this error? may I change send method or use a different send method for other wallets?

FYI, when set useGSN in send method to false it works with all wallets, .send({ from: account, gas: 1e6, useGSN: false }), when change it to true only Metamask shows a signature confirmation.

Torus popup to confirm signature opens two times and popup remains loading and nothing showing!

Relaying errors (2):
https://rk22.relays.opengsn.org/gsn1 => Failed to sign relayed transaction for {walletAdress}: Invalid parameters: must provide an Ethereum address.https://digglehopper-alpha.com/gsn1 => Failed to sign relayed transaction for {walletAdress}: Invalid parameters: must provide an Ethereum address.

Formatic popup also opens two times but it loads content except torus and when I confirm signature this error returns.

Failed to relay call. Results:
Relaying errors (2):
https://rk22.relays.opengsn.org/gsn1 => Failed to sign relayed transaction for {walletAdress}: Error: Invalid signature lengthhttps://digglehopper-alpha.com/gsn1 => Failed to sign relayed transaction for {walletAdress}: Error: Invalid signature length 

Am I doing something wrong? Did you try GSN with other wallets like torus?

I use @opengsn/provider 2.2.2

2 Likes

We did try it and it works with portis.
Please try to add a configuration param:
RelayProvider.newProvider( provider, config:{ methodSuffix: “_v4” } )

Possible values are “_v3” and “_v4”
And please let us know if one of them worked.

1 Like

Torus error changed when I added methodsuffix
With methodsuffix _v4 & _v3

RelayProvider.js?a892:105 Failed to relay call. Results:
Relaying errors (2):
https://rk22.relays.opengsn.org/gsn1 => Failed to sign relayed transaction for {wallet-address}: "params.data" must be a string.https://digglehopper-alpha.com/gsn1 => Failed to sign relayed transaction for {wallet-address}: "params.data" must be a string.

Without methodsuffix

Failed to relay call. Results:
Relaying errors (2):
https://rk22.relays.opengsn.org/gsn1 => Failed to sign relayed transaction for {wallet-add}: Invalid parameters: must provide an Ethereum address.https://digglehopper-alpha.com/gsn1 => Failed to sign relayed transaction for {wallet-add}: Invalid parameters: must provide an Ethereum address.

Fortmatic error changed when I added methodsuffix
With methodsuffix _v4 & _v3

Failed to relay call. Results:
Relaying errors (2):
https://rk22.relays.opengsn.org/gsn1 => local view call to 'relayCall()' reverted: view call to 'relayCall' reverted in client: Fortmatic RPC Error: [-32603] execution reverted: Paymaster balance too lowhttps://digglehopper-alpha.com/gsn1 => local view call to 'relayCall()' reverted: view call to 'relayCall' reverted in client: Fortmatic RPC Error: [-32603] execution reverted: no gas for innerRelayCall

Without methodsuffix.

Failed to relay call. Results:
Relaying errors (2):
https://rk22.relays.opengsn.org/gsn1 => Failed to sign relayed transaction for {wallet-address}: Error: Invalid signature lengthhttps://digglehopper-alpha.com/gsn1 => Failed to sign relayed transaction for {wallet-address}: Error: Invalid signature length
    at eval (RelayProvider.js?a892:106)

Also, you said it works with Portis, And I tried with portis, but I got errors on portis too.
With methodsuffix _v4 & _v3
SyntaxError: Unexpected token o in JSON at position 1
Without methodsuffix
TypeError: e.map is not a function

But Metamask works perefctly with both methodsuffix and without it.

1 Like