hi Clarian, Im having a typing error it seems to be but dont know why, this is the error: Unhandled Rejection (TypeError): decentralBank.methods.stakingBalance is not a function. Please need some help:(
My Code is:
import React, {Component} from 'react'
import './App.css'
import Navbar from './Navbar';
import Web3 from 'web3';
import Tether from '../truffle_abis/Tether.json'
import RWD from '../truffle_abis/RWD.json'
import DecentralBank from '../truffle_abis/DecentralBank.json'
hi Clarian, Im having a typing error it seems to be but dont know why, this is the error: Unhandled Rejection (TypeError): decentralBank.methods.stakingBalance is not a function. Please need some help:(
My Code is:
import React, {Component} from 'react' import './App.css' import Navbar from './Navbar'; import Web3 from 'web3'; import Tether from '../truffle_abis/Tether.json' import RWD from '../truffle_abis/RWD.json' import DecentralBank from '../truffle_abis/DecentralBank.json'
class App extends Component {
async loadBlockchainData() { const web3 = window.web3 const account = await web3.eth.getAccounts() this.setState({account: account[0]}) const networkId = await web3.eth.net.getId()
} constructor(props) { super(props) this.state = { account: '0x0', tether: {}, rwd: {}, decentralBank: {}, tetherBalance: '0', rwdBalance: '0', stakingBalance: '0', loading: true } }
}
export default App;