AndrewKishino / sotez

A JS Library for Tezos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

uncaught promise rejection on import

pciavald opened this issue · comments

i'm trying to use Sotez for a dApp development but importing seems to fail.

This is how I import sotez

import Sotez, { utility, forge, crypto, ledger } from 'sotez'

An error pops in the console saying Uncaught (in promise): undefined with this code being the last in the stack trace

            Blake2b.ready = function(cb) {
                if (!cb)
                    cb = noop
                if (!wasm)
                    return cb(new Error('WebAssembly not supported'))

                // backwards compat, can be removed in a new major
                var p = new Promise(function(reject, resolve) {
                    wasm.onload(function(err) {
                        if (err)
                            resolve() // latest stack trace is here
                        else
                            reject()
                        cb(err)
                    })
                }
                )

                return p
            }

Also, only adding this import statement adds 6 seconds to the loading, is that normal ?