})
}
-export function updateBase(params)
-{
- const url = "/dapp/update-base"
- return axios({
- method: 'post',
- url,
- data: params
- }).then(response => {
- if(response.data.code === 200){
- return response.data.result;
- }else {
- throw response.data.msg
- }
- })
-}
-
export function updateUtxo(params)
{
const url = "/dapp/update-utxo"
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom'
import NetworkInfo from './NetworkInfo'
-import { UpdateProgramBase as updateSave } from "../save/action";
-import { UpdateProgramBase as updateProfit } from "../profit/action";
const Header = class extends Component {
super(props)
}
- componentDidMount() {
- if(window.bytom){
- updateSave();
- updateProfit();
- }
- }
-
render () {
return (
<nav className="navbar navbar-expand-lg bg-secondary fixed-top text-uppercase" id="mainNav">
import {
spendUTXOAction, spendWalletAction, controlProgramAction, controlAddressAction,
- updateBase, updateBalances, updateUtxo, listDappUTXO, contractArguments
+ updateBalances, updateUtxo, listDappUTXO, contractArguments
} from '../../bytom'
import {profitProgram, assetDeposited, assetBill, gas, banker, totalAmountBill, totalAmountCapital} from "../../constants";
})
})
}
-
-export function UpdateProgramBase(){
- return updateBase({
- "program": profitProgram,
- "asset": assetDeposited
- })
-}
\ No newline at end of file
import {
spendUTXOAction, spendWalletAction, controlProgramAction,
- controlAddressAction, listDappUTXO, updateBase, updateUtxo ,updateBalances,
+ controlAddressAction, listDappUTXO, updateUtxo ,updateBalances,
contractArguments
} from '../../bytom'
import {
})
})
}
-
-export function UpdateProgramBase(){
- return updateBase({
- "program": depositProgram,
- "asset": assetBill
- })
-}