master
lza_menace 2 years ago
parent f0467b499c
commit 2eb0002094

@ -333,16 +333,10 @@ function Section3() {
const sendBombsPrepare = usePrepareContractWrite({ const sendBombsPrepare = usePrepareContractWrite({
address: contractAddress, address: contractAddress,
abi: MainABI, abi: MainABI,
enabled: isConnected && options.bombBalance > 0, enabled: isConnected,
staleTime: 2_000, staleTime: 2_000,
functionName: 'sendBombs', functionName: 'sendBombs',
args: [options.sendBombAmount], 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);
}
}); });
const sendBombsWrite = useContractWrite(sendBombsPrepare.config); const sendBombsWrite = useContractWrite(sendBombsPrepare.config);
useWaitForTransaction({ 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>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> <p>You have {options.unaboomerBalance} BOOMR</p>
<img src={Boomer} alt="" width="120px" /> <img src={Boomer} alt="" width="120px" />
{options.unaboomerSupply < options.unaboomerMaxSupply && ( <p>
<> <AwesomeButton type="secondary" ripple={true} disabled={radicalizeBoomersPrepare.status == 'error'} onPress={() => radicalizeBoomersWrite.write?.()}>
<p> {radicalizeBoomersWrite.isLoading && <>minting {options.unaboomerAmount}</> || <>mint {options.unaboomerPreviewAmount} ({ethers.utils.formatEther((options.unaboomerPrice * options.unaboomerPreviewAmount).toString())} Ξ)</>}
<AwesomeButton type="secondary" ripple={true} disabled={radicalizeBoomersPrepare.status == 'error'} onPress={() => radicalizeBoomersWrite.write?.()}> </AwesomeButton>
{radicalizeBoomersWrite.isLoading && <>minting {options.unaboomerAmount}</> || <>mint {options.unaboomerPreviewAmount} ({ethers.utils.formatEther((options.unaboomerPrice * options.unaboomerPreviewAmount).toString())} Ξ)</>} </p>
</AwesomeButton> <Slider className="slider" min={1} max={30} onAfterChange={(v) => handleStateChange({unaboomerAmount: v})} onChange={(v) => handleStateChange({unaboomerPreviewAmount: v})} />
</p>
<Slider className="slider" min={1} max={30} onAfterChange={(v) => handleStateChange({unaboomerAmount: v})} onChange={(v) => handleStateChange({unaboomerPreviewAmount: v})} />
</>
)}
</div> </div>
<div className="mintItem"> <div className="mintItem">
<h1>Assemble Bombs</h1> <h1>Assemble Bombs</h1>

Loading…
Cancel
Save