Giter Site home page Giter Site logo

trn-js-api's People

Contributors

aidan-starke avatar karishmabothara avatar ken-futureverse avatar

Watchers

 avatar  avatar  avatar

Forkers

joeykhd spdev39

trn-js-api's Issues

`wrapWithFeeProxy` returns an error when trying estimate fee

As per the conversation here https://futureverse.slack.com/archives/C04CSC7SGD8/p1718577232284409?thread_ts=1718346059.147479&cid=C04CSC7SGD8

client.js:1 Error: Wrap::Cannot convert 3.1204634625585274e+21 to a BigInt
    at eval (index.js:1:1806)
    at eval (index.js:1:4892)
    at Generator.throw (<anonymous>)
    at s (index.js:1:875)Caused by: SyntaxError: Cannot convert 3.1204634625585274e+21 to a BigInt (at index.js:1:10158)
    at BigInt (<anonymous>)
    at eval (index.js:1:10158)
    at Generator.next (<anonymous>)
    at a (index.js:1:836)

Allow option to return fail result if proxy call is failed

Currently, if call wrapped around Futurepass failed, it's a silent one. The error details is tucked inside the proxy.ProxyExecuted which is easy to miss.

We should look at adding option to fail the extrinsic when that happen just like when any other failed extrinsic https://github.com/futureversecom/trn-js-api/blob/main/packages/extrinsic/src/libs/send.ts#L36

It needs to be optional flag to avoid breaking changes downstream, as they might have had their own error catching logic.

The proposed location is a 3rd parameter to the send function

export async function send(
  extrinsicOrResult: Extrinsic | Result<Extrinsic, Error>,
  onProgress?: ProgressCallback,
  options: { failedIfProxyError: boolean } = { failedIfProxyError: false }
)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.