#Error in Payment example DApp

1 messages · Page 1 of 1 (latest)

visual harbor
#

Hi. I'm testing locally https://github.com/stellar/soroban-react-payment. The problem arises once I provide the token ID (it's CB2PMFLGDVFSJLCLC5EIEXKDF6UGMFSH5SA3NKKBJO7NDD6AR3TFSRV3 on futurenet), the DApp logs this error in the console:

code: -32602
data: "[-32602] got 1 parameters, want 2"
message: "invalid parameters"

I've tracked down the issue and it's an exception caused when attempting to retrieve the token symbol, specifically when calling const response = await server.simulateTransaction(tx); in https://github.com/stellar/soroban-react-payment/blob/dfaf44c96c809612357f3afa342e89c62fe69902/src/helpers/soroban.ts, simulateTx function.

The tokens are detected by the wallet, see attached image.

It seems like an API issue? I haven't done any modification to the DApp and it seems to be using the latest SDK.

proud oak
#

It kind of sounds like outdated dependencies to me. The error you get was around for a while when a breaking change was introduced in the RPC server, quickly fixed by updates to SDKs

#

And the repo has the following in package.json: "soroban-client": "1.0.0-beta.2", which is definitely outdated (to my knowledge)

visual harbor
#

saw that dependency, but IIRC it's imported but unused. the code I pointed out uses the new SDK @stellar/stellar-sdk

rough monolith
#

@tender aspen here we could help with @soroban-react

tender aspen
visual harbor
#

Hey @calm siren @proud oak any ideas? All the example dapps have the same problem

#

Otherwise, do you know a good working example dApp I could tinker with?

#

the soroban-client dep is not the problem, as it's not used

calm siren
visual harbor
#

agh thanks.. is there somebody you think could help me here?

proud oak
#

I don't know either, sorry.
@limpid chasm do you know who has a JS type hat and can have a look at the examples?

limpid chasm
#

Heya, yeah i think i know who can help. I'll pull in some people. Might be a sec though since it's the weekend

visual harbor
#

hey @limpid chasm , thank you. please lmk if there's anything I can help with!

limpid chasm
#

@glass bobcat will pop in here in a bit!

glass bobcat
#

@visual harbor Hi, sorry for the confusion on this. This is indeed due to an out of date dependency. We actually had a PR open to update, but it hadn't been merged.

It is merged now, so this should work as expected if you pull down the main branch now