diff --git a/src/App.js b/src/App.js index 2c51784..3161251 100644 --- a/src/App.js +++ b/src/App.js @@ -68,6 +68,7 @@ export const App = () => { rest_gw: process.env.REACT_APP_RESTGW ? process.env.REACT_APP_RESTGW : 'https://rest.t5.fs.neo.org/v1', }); + const [networkInfo, setNetworkInfo] = useState(null); const [depositQuantity, setDepositQuantity] = useState(0); const [withdrawQuantity, setWithdrawQuantity] = useState(0); const [attributes, setAttributes] = useState([]); @@ -214,6 +215,12 @@ export const App = () => { onPopup('success', 'Wallet connected'); onModal(); + api('GET', '/network-info').then((e) => { + if (!e.message) { + setNetworkInfo(e); + } + }); + if (location.pathname.indexOf('/profile') === -1 && location.pathname.indexOf('/getobject') === -1) { navigate('/profile'); } @@ -1083,7 +1090,7 @@ export const App = () => { Container creation is a paid operation, make sure you have sufficient NeoFS chain balance )} - Container cost is 0.0070000014 GAS for mainnet now. + {`Container cost is ${networkInfo ? networkInfo.namedContainerFee * 0.00000001 : '-'} GAS for mainnet now.`} Name @@ -1717,7 +1724,7 @@ export const App = () => { /> {`Withdraw from NeoFS to ${activeNet}`} - Withdrawing requires a fee to be paid, currently it's 7 GAS. It will be reduced once the notary subsystem is implemented in Neo + {`Withdrawing requires a fee to be paid, currently it's ${networkInfo ? networkInfo.withdrawalFee * 0.00000001 : '-'} GAS.`} It will be reduced once the notary subsystem is implemented in Neo Quantity (GAS)