diff --git a/client/src/components/inventory.jsx b/client/src/components/inventory.jsx index 0d96f99b..e17d23d6 100644 --- a/client/src/components/inventory.jsx +++ b/client/src/components/inventory.jsx @@ -4,22 +4,6 @@ const toast = require('izitoast'); const actions = require('./../actions'); -const balanceError = () => - toast.error({ - theme: 'dark', - color: 'black', - timeout: false, - drag: false, - position: 'center', - maxWidth: window.innerWidth / 2, - close: false, - buttons: [ - ['', - (instance, thisToast) => instance.hide({ transitionOut: 'fadeOut' }, thisToast)], - ], - message: 'Insufficient Balance', - }); - const addState = connect( function receiveState(state) { const { @@ -40,8 +24,7 @@ const addState = connect( }, function receiveDispatch(dispatch) { - function setMtxActive(mtx, balance) { - if (balance === 0) return balanceError(); + function setMtxActive(mtx) { dispatch(actions.setConstructRename(null)); dispatch(actions.setMtxActive(mtx)); return true; @@ -64,7 +47,7 @@ function Inventory(args) { if (!shop) return false; const useMtx = (item, i) => ( -
setMtxActive(item, account.balance)} > +
setMtxActive(item)} >
{item}
diff --git a/server/src/rpc.rs b/server/src/rpc.rs index 6c4594de..b137ad66 100644 --- a/server/src/rpc.rs +++ b/server/src/rpc.rs @@ -184,7 +184,7 @@ impl Connection { Ok(RpcMessage::ConstructSpawn(mtx::new_construct(&mut tx, account)?)), RpcRequest::MtxConstructApply { mtx, construct_id, name } => - Ok(RpcMessage::AccountConstructs(mtx::apply(&mut tx, account, mtx, construct_id, name)?)), + Ok(RpcMessage::AccountTeam(mtx::apply(&mut tx, account, mtx, construct_id, name)?)), RpcRequest::MtxBuy { mtx } => Ok(RpcMessage::AccountShop(mtx::buy(&mut tx, account, mtx)?)),