mirror of
https://github.com/fullstack-cash/fullstack-gatsby-theme-bch-wallet.git
synced 2026-09-21 16:52:06 -07:00
Merge pull request #2 from Permissionless-Software-Foundation/ct-unstable
Syncing upstream gatsby-theme-bch-wallet
This commit is contained in:
@@ -12,7 +12,6 @@ import axios from 'axios'
|
|||||||
|
|
||||||
const isIpfs = require('is-ipfs')
|
const isIpfs = require('is-ipfs')
|
||||||
|
|
||||||
|
|
||||||
let _this
|
let _this
|
||||||
|
|
||||||
class Tokens extends React.Component {
|
class Tokens extends React.Component {
|
||||||
@@ -310,7 +309,7 @@ class Tokens extends React.Component {
|
|||||||
async handleMutableData (tokensArr) {
|
async handleMutableData (tokensArr) {
|
||||||
try {
|
try {
|
||||||
const bchWalletLib = _this.props.bchWallet
|
const bchWalletLib = _this.props.bchWallet
|
||||||
const bchjs = bchWalletLib.bchjs
|
// const bchjs = bchWalletLib.bchjs
|
||||||
|
|
||||||
const tokens = []
|
const tokens = []
|
||||||
// const slpMutableLib = new SlpMutableData()
|
// const slpMutableLib = new SlpMutableData()
|
||||||
@@ -319,8 +318,15 @@ class Tokens extends React.Component {
|
|||||||
const token = tokensArr[i]
|
const token = tokensArr[i]
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// OLD code. This can be deleted.
|
||||||
|
// // Get token data from bch-api.
|
||||||
|
// const tokenData = await bchjs.PsfSlpIndexer.getTokenData(token.tokenId)
|
||||||
|
// // console.log(`tokenData ${i}: ${JSON.stringify(tokenData, null, 2)}`)
|
||||||
|
|
||||||
|
await bchWalletLib.walletInfoPromise
|
||||||
|
|
||||||
// Get token data from bch-api.
|
// Get token data from bch-api.
|
||||||
const tokenData = await bchjs.PsfSlpIndexer.getTokenData(token.tokenId)
|
const tokenData = await bchWalletLib.getTokenData(token.tokenId)
|
||||||
// console.log(`tokenData ${i}: ${JSON.stringify(tokenData, null, 2)}`)
|
// console.log(`tokenData ${i}: ${JSON.stringify(tokenData, null, 2)}`)
|
||||||
|
|
||||||
// Extract the raw CID.
|
// Extract the raw CID.
|
||||||
|
|||||||
Reference in New Issue
Block a user