master
lza_menace 2 years ago
parent f0467b499c
commit 2eb0002094

@ -333,16 +333,10 @@ function Section3() {
const sendBombsPrepare = usePrepareContractWrite({
address: contractAddress,
abi: MainABI,
enabled: isConnected && options.bombBalance > 0,
enabled: isConnected,
staleTime: 2_000,
functionName: 'sendBombs',
args: [options.sendBombAmount],
onError(err) {
// console.log(err.message);
const iface = new ethers.utils.Interface(MainABI);
const res = iface.decodeFunctionData(err.message)
console.log(res);
}
args: [options.sendBombAmount]
});
const sendBombsWrite = useContractWrite(sendBombsPrepare.config);
useWaitForTransaction({
@ -377,16 +371,12 @@ function Section3() {
<p>Radicalizing a boomer will mint ERC-721 BOOMR tokens with images of a pixel art Web3 Unaboomers.</p>
<p>You have {options.unaboomerBalance} BOOMR</p>
<img src={Boomer} alt="" width="120px" />
{options.unaboomerSupply < options.unaboomerMaxSupply && (
<>
<p>
<AwesomeButton type="secondary" ripple={true} disabled={radicalizeBoomersPrepare.status == 'error'} onPress={() => radicalizeBoomersWrite.write?.()}>
{radicalizeBoomersWrite.isLoading && <>minting {options.unaboomerAmount}</> || <>mint {options.unaboomerPreviewAmount} ({ethers.utils.formatEther((options.unaboomerPrice * options.unaboomerPreviewAmount).toString())} Ξ)</>}
</AwesomeButton>
</p>
<Slider className="slider" min={1} max={30} onAfterChange={(v) => handleStateChange({unaboomerAmount: v})} onChange={(v) => handleStateChange({unaboomerPreviewAmount: v})} />
</>
)}
<p>
<AwesomeButton type="secondary" ripple={true} disabled={radicalizeBoomersPrepare.status == 'error'} onPress={() => radicalizeBoomersWrite.write?.()}>
{radicalizeBoomersWrite.isLoading && <>minting {options.unaboomerAmount}</> || <>mint {options.unaboomerPreviewAmount} ({ethers.utils.formatEther((options.unaboomerPrice * options.unaboomerPreviewAmount).toString())} Ξ)</>}
</AwesomeButton>
</p>
<Slider className="slider" min={1} max={30} onAfterChange={(v) => handleStateChange({unaboomerAmount: v})} onChange={(v) => handleStateChange({unaboomerPreviewAmount: v})} />
</div>
<div className="mintItem">
<h1>Assemble Bombs</h1>

Loading…
Cancel
Save