Repository navigation
fix(dpns): bump evo-sdk to 5.0.3 so name registration works on Platform 5.0, and show real SDK errors - #60
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…rm 5.0, and show real SDK errors Platform 5.0 (protocol 14, live on mainnet and testnet) makes document ids commit to the identity contract nonce (dashpay/platform#4859). evo-sdk 4.1.1 still derives the old id, so every DPNS registration, contested or not, was rejected client-side with "Invalid document transition id ..., expected ...". The UI showed that as "Failed: [object Object]" because WasmSdkError is not an Error subclass. extractErrorMessage now includes the error kind and code and serializes plain objects, and the DPNS, identity, login and manage paths use it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
8362613 to
258c04c
Compare
…the withdraw test The first network-status snapshot re-renders the page and wipes typed input (the WIF field is never rendered back). Polling starts after the idle-time SDK warmup, and the larger evo-sdk 5.0.3 chunk moves that render into the window where the withdraw test types, so its blur handlers saw empty fields. Use the existing openApp helper, which blocks external requests and waits for that render, as the other mock-mode tests already do. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merged as 3ac4f88 and deployed by Deploy run 45417863976 (build and deploy both passed). Live check on bridge.thepasta.org:
🤖 Posted autonomously by Claude (claude-opus-5-5) on behalf of pasta. |
Problem
On the mainnet bridge, registering a username fails with
Failed: [object Object]. Pasta saw it with the contested nameforge.dash, but it isn't specific to contested names: every DPNS registration fails, contested or not.Root cause
Mainnet and testnet Platform now run 5.0 (protocol 14, drive 5.0.3). Its breaking change dashpay/platform#4859, "document ids commit to the identity contract nonce", changed how document IDs are derived. The bridge pins
@dashevo/evo-sdk4.1.1, which still derives the old ID. Sosdk.dpns.registerNamefails client-side before anything is broadcast, with:Identity creation and top-ups don't create documents, which is why they still worked.
The UI showed this as
[object Object]because the SDK rejects withWasmSdkError, which is not anErrorsubclass. The DPNS path fell back toString(error).Changes
@dashevo/evo-sdk(and the@dashevo/wasm-sdkit pulls in) from 4.1.1 to 5.0.3, the current release that matches the network.extractErrorMessagehandles SDK error objects: it shows the kind, the message and a present code (Protocol: Invalid document transition id …), and serializes plain objects that have no message. The DPNS registration and availability checks, identity update, login, the manage/withdraw/contract/key-fetch paths andtoErroruse it instead ofinstanceof Error ? … : String(error). Serialized objects are capped at 300 characters, and getters that throw (a freed WASM object) fall back to "Unknown error".openApphelper, which blocks external requests and waits for the first network-status render before typing. That render re-renders the page and wipes typed input (the WIF field is never rendered back). Polling starts after the idle-time SDK warmup, and the larger 5.0.3 chunk (~12.8 MB vs ~10 MB) moved that render into the window where the test types, so it failed in CI. The other mock-mode tests already wait the same way.Verification
registerNamecall registered the contested namebrqa1ebcdcag.dashon testnet for identityAPScJRQFRz1RVrtauRLALMr2eizwGv9c8TNhJ7EZfwJf. Preorder4nUNryMYf3MxSBGjyGFHFqdXN6zdpB9Xe3uctdrtVoT9, domain6YMArpZeTBwUsuj6DBDvvAhNMk87rSQdvYDAqfqSgJHD. It cost about 10.1B credits (~0.1 DASH).fbqidfecajdeb. The result row shows "Entered voting period". The contested vote poll forfbq1dfecajdebexists on testnet withAPScJRQFRz1RVrtauRLALMr2eizwGv9c8TNhJ7EZfwJfas the contender (0 votes so far). The identity's balance fell by 10,108,265,220 credits (~0.101 DASH).Note for forge.dash
A contested name costs about 0.1 DASH in credits. Identity
8YbYWEGBpQeUmiSa5B1VmyH3ogJPRSsbxYpr37NDWhvnon mainnet currently holds 866,449,860 credits (~0.0087 DASH), so it needs a top-up of roughly 0.1 DASH or more beforeforge.dashcan be registered, even with this fix.🤖 Generated with Claude Code