multiversx / mx-sdk-dapp

A library that holds the core functional logic of a dapp on the MultiversX
66 stars 63 forks source link

Updated default chainID to empty string instead of `-1` #1192

Closed razvantomegea closed 2 months ago

razvantomegea commented 2 months ago

Issue

Transactions signing fail on dapp refresh.

Reproduce

Actual Result: Transaction cancelled error appears Expected Result: Transactions are signed and processing

Root cause

chainID is set to -1 by default. This causes the chainID check to pass as truthy in waitForChainID function and return an incorrect value.

Furthermore, the returned chainID will be different than the chainID of the signed transactions, so, those transactions will fail.

Fix

Make the chainID '' by default.

Additional changes

Contains breaking changes

[x] No

[] Yes

Updated CHANGELOG

[x] Yes

Testing

[x] User testing [] Unit tests