bodhiproject/qrypto

QryptoRPCProvider should add `getTransactionInfo(txid)` and `getNetworkName()`

Closed this issue · 2 comments

dcb9 commented

These two methods are necessary to develop a DApp

const network = networks.testnet

const insight = network.insight()

const info = await insight.getTransactionInfo("f20914f3d810010c0a74df60abb3fcf0d3ff2669d944ce187f079ec9faec563e")
console.log(info)
  • getNetworkName should return a network name which user logged in

@hayeah What do you think of exposing the tx info and network via QryptoRPCProvider? Seems to me like this would be better suited for a wrapper helper class.

@dcb9
-you can get the network name from window.qrypto.account object (see the readme)
-as for getting the transactions that is not something built into qtumjs-wallet at this time, so you will have to use the insight api to get that information yourself directly