OSDN Git Service

removed update-base from font-end
authorZhiting Lin <zlin035@uottawa.ca>
Mon, 18 Feb 2019 07:02:44 +0000 (15:02 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Mon, 18 Feb 2019 07:02:44 +0000 (15:02 +0800)
src/components/bytom.js
src/components/layout/header/index.jsx
src/components/layout/profit/action.js
src/components/layout/save/action.js

index a8190fc..d9e363c 100644 (file)
@@ -73,22 +73,6 @@ export function listDappUTXO(params)
   })
 }
 
-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"
index 7a51011..0f61f0c 100644 (file)
@@ -1,8 +1,6 @@
 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 {
 
@@ -10,13 +8,6 @@ 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">
index 938b36a..c6c4c6c 100644 (file)
@@ -1,6 +1,6 @@
 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";
 
@@ -78,10 +78,3 @@ export function FixedLimitProfit(account, amountBill, saver) {
     })
   })
 }
-
-export function UpdateProgramBase(){
-  return updateBase({
-    "program": profitProgram,
-    "asset": assetDeposited
-  })
-}
\ No newline at end of file
index 159a1bf..d30122f 100644 (file)
@@ -1,6 +1,6 @@
 import {
   spendUTXOAction, spendWalletAction, controlProgramAction,
-  controlAddressAction, listDappUTXO, updateBase, updateUtxo ,updateBalances,
+  controlAddressAction, listDappUTXO, updateUtxo ,updateBalances,
   contractArguments
 } from '../../bytom'
 import {
@@ -76,10 +76,3 @@ export function FixedLimitDeposit(account, amount, address) {
     })
   })
 }
-
-export function UpdateProgramBase(){
-  return updateBase({
-    "program": depositProgram,
-    "asset": assetBill
-  })
-}