Methods to generate assets are crashing on negative numbers
In Explorer we cannot properly display some assets, (Vests and Hives). When we use Wax'es method to convert the number into assets (that will later be change by the Wax'es formatter), we have errors for negative numbers arguments.
This is the stack:
Error: fc::assert_exception,
at ___throw_exception_with_stack_trace (webpack-internal:///./node_modules/@hive/wax/wasm/dist/bundle/web.js:14949:5452176)
at wasm://wasm/00f6a49a:wasm-function[142]:0xbad1
at wasm://wasm/00f6a49a:wasm-function[144]:0xdfee
at wasm://wasm/00f6a49a:wasm-function[554]:0x35ef1
at wasm://wasm/00f6a49a:wasm-function[5495]:0x217446
at wasm://wasm/00f6a49a:wasm-function[2698]:0x135c8c
at protocol_foundation.cpp_asset_symbol (eval at newFunc (webpack-internal:///./node_modules/@hive/wax/wasm/dist/bundle/web.js), <anonymous>:9:10)
at HiveChainApi.getAsset (webpack-internal:///./node_modules/@hive/wax/wasm/dist/bundle/web.js:14874:35)
at DefaultFormatters.formatNai (webpack-internal:///./node_modules/@hive/wax/wasm/dist/bundle/web.js:14595:43)
at DefaultFormatters.assetFormatter (webpack-internal:///./node_modules/@hive/wax/wasm/dist/bundle/web.js:14603:21)
at WaxFormatter.handleProperty (webpack-internal:///./node_modules/@hive/wax/wasm/dist/bundle/web.js:14820:74)
at WaxFormatter.traverseTemplateValue (webpack-internal:///./node_modules/@hive/wax/wasm/dist/bundle/web.js:13788:33)
at WaxFormatter.rawDataParser (webpack-internal:///./node_modules/@hive/wax/wasm/dist/bundle/web.js:13798:18)
at WaxFormatter.format (webpack-internal:///./node_modules/@hive/wax/wasm/dist/bundle/web.js:13812:21)
at Object.selectFunction [as select] (webpack-internal:///./api/common/useWitnessDetails.ts:20:108)
at QueryObserver.createResult (webpack-internal:///./node_modules/@tanstack/query-core/build/lib/queryObserver.mjs:322:26)
at QueryObserver.getOptimisticResult (webpack-internal:///./node_modules/@tanstack/query-core/build/lib/queryObserver.mjs:114:25)
at useBaseQuery (webpack-internal:///./node_modules/@tanstack/react-query/build/lib/useBaseQuery.mjs:49:27)
at useQuery (webpack-internal:///./node_modules/@tanstack/react-query/build/lib/useQuery.mjs:14:73)
at useWitnessDetails (webpack-internal:///./api/common/useWitnessDetails.ts:23:169)
at Account (webpack-internal:///./pages/[accountName].tsx:104:154)
at renderWithHooks (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:16305:18)
at updateFunctionComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:19590:24)
at beginWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:21596:16)
at beginWork$1 (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:27421:14)
at performUnitOfWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:26552:12)
at workLoopSync (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:26461:5)
at renderRootSync (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:26429:7)
at performSyncWorkOnRoot (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:26080:20)
at flushSyncCallbacks (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:12042:22)
at eval (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:25646:13)
Edited by Jakub Lachór