Skip to content

withdrawStart in POS gives error #328

Discussion options

You must be logged in to vote

this is because you have not provided from value. You can provide from in transaction option or you can provide default value in client.

const result = await withdrawStart(100,{
   from:'from address'
})

or in the client as default from -

 const posClient = new POSClient()
  return posClient.init({
    log: true,
    network: network,
    version: version,
    child: {
      provider: new HDWalletProvider(privateKey, config.child.rpc),
      defaultConfig: {
        from: userAddress
      }
    },
    parent: {
      provider: new HDWalletProvider(privateKey, config.parent.rpc),
      defaultConfig: {
        from: userAddress
      }
    }
  });

this one is more recommended, as it wil…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by m-a-x-i-m-u-s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #327 on April 04, 2022 06:43.