MeshJS / mesh

TypeScript open-source library to advance Web3 development on Cardano
https://meshjs.dev
Apache License 2.0
217 stars 63 forks source link

the TX builder adds a testnet addr and signing such a Tx errors out #288

Open MiroslavRet opened 2 months ago

MiroslavRet commented 2 months ago

SwapNFT.tsx:90 Error initiating swap: TxSendError: (400) failed: xxxxxxx Some discriminated entities in the transaction are configured for another network. In fact, payment addresses, stake addresses and stake pool registration certificates are bound to a specific network identifier. This identifier must match the network you're trying to submit them to. Since the Alonzo era, transactions themselves may also contain a network identifier. The field 'data.expectedNetwork' indicates what is the currrently expected network. The field 'data.discriminatedType' indicates what type of entity is causing an issue here. And 'data.invalidEntities' lists all the culprits found in the transaction. The latter isn't present when the transaction's network identifier itself is wrong. Data: {"discriminatedType":"address","invalidEntities":["addr_test1xxxxxxxxxxxxxxxx"],"expectedNetwork":"mainnet"}

at getTxSendError (dom.js:2541:12)
at Object.submitTx (dom.js:2338:13)

txBodyJson.txt

at async initiateSwap (SwapNFT.tsx:85:22)
jinglescode commented 2 months ago

@MiroslavRet update version 1.7.2 do npm install @meshsdk/core@1.7.2 && npm install @meshsdk/contract@1.7.2