Skip to content

Commit

Permalink
chore: remove pointless log from coins + toast when metamask not inst…
Browse files Browse the repository at this point in the history
…alled
  • Loading branch information
OwshenNetwork committed Jun 18, 2024
1 parent 8f0e4c8 commit 3e9269f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
3 changes: 1 addition & 2 deletions client/src/components/Modal/TransactionModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ const TransactionModal = ({
setIsLoading
);
} else {
setInterval(shuffleText, 8000);
await send(
destOwshenWallet,
tokenContract,
Expand Down Expand Up @@ -190,7 +189,7 @@ const TransactionModal = ({
useEffect(() => {
if (!isOpen) {
setDstOwshenWallet("");
setTokenAmount(0);
setTokenAmount('');
SetSelectTokenLabel("DIVE");
}
}, [isOpen]);
Expand Down
6 changes: 4 additions & 2 deletions client/src/components/SelectNetwork/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ const SelectNetwork = () => {
return toast.error("Please select your network!");
}

const networkName = getNetworkNameByChainId(ChainId);
const networkName = isTest
? getNetworkNameByChainId(11155111)
: getNetworkNameByChainId(ChainId);

setNetWork(networkName);
const selectedNetwork = networkDetails[networkName];
Expand All @@ -57,7 +59,7 @@ const SelectNetwork = () => {
setChainId(ChainId);
}; // Add any dependencies here if getChainId depends on props or state
getChainId();
});
},[isTest]);

const updateNetworkDetails = (name, chainId, contractName) => {
dispatch(setNetworkDetails({ name, chainId, contractName }));
Expand Down
2 changes: 2 additions & 0 deletions client/src/components/WalletConnection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const Web3ModalComponent = () => {
window.ethereum.on("accountsChanged", (accounts) => {
dispatch(setUserDetails({ address: accounts[0] }));
});
}else{
toast.error("Please make sure you have installed Metamask on your browser!")
}
}, [dispatch]);

Expand Down
2 changes: 1 addition & 1 deletion client/src/store/containerSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const containerSlice = createSlice({
selected_token_contract: null,
mode: null,
},
isTest: false,
isTest: true,
netWorkDetails: {
name: "",
chainId: 0,
Expand Down
2 changes: 0 additions & 2 deletions src/apis/coins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,13 @@ pub async fn coins(
.owshen_contract_deployment_block_number
.as_u64()
};
log::info!("In curr {}", curr);
curr = curr.max(
network
.config
.owshen_contract_deployment_block_number
.as_u64(),
);
curr = curr - 1;
log::info!("Un curr {}", curr);

#[allow(unused_assignments)]
let mut spent_events: Vec<SpendFilter> = vec![];
Expand Down

0 comments on commit 3e9269f

Please sign in to comment.