Skip to content

Commit

Permalink
Fixed bignumber bug
Browse files Browse the repository at this point in the history
  • Loading branch information
eguajardo committed May 31, 2021
1 parent db176bd commit 35420cf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/UI/CollectionCard.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { loadJsonFromIPFS, ipfsPathToURL } from "../../utils/ipfs-utils";
import { contracts } from "../../utils/contracts-utils";
import { ethers, utils } from "ethers";
import { ethers, utils, BigNumber } from "ethers";
import { useState, useCallback, useEffect } from "react";
import { useContractFunction, useEthers, useBlockNumber } from "@usedapp/core";

Expand Down Expand Up @@ -65,7 +65,7 @@ function CollectionCard(props) {
requestId
);

if (signature && signature.toNumber() !== 0) {
if (signature && !signature.isZero()) {
setButtonState({
class: "btn btn-primary btn-lg btn-block mt-2",
disabled: false,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/UI/CollectionForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function CollectionForm(props) {
</div>

<div className="form-group">
<label htmlFor="price">Price</label>
<label htmlFor="price">Price per pack</label>
<input
ref={priceInputRef}
type="number"
Expand Down
30 changes: 15 additions & 15 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ import reportWebVitals from "./reportWebVitals";
import { ChainId, DAppProvider } from "@usedapp/core";
import { BrowserRouter } from "react-router-dom";

const config = {
readOnlyChainId: 31337,
readOnlyUrls: {
[ChainId.Hardhat]: "http://127.0.0.1:8545",
},
supportedChains: [31337],
multicallAddresses: {
31337: "0x935Bfe9AfaA2Be26049ea4EDE40A3A2243361F87",
},
};

// const config = {
// readOnlyChainId: 80001,
// readOnlyChainId: 31337,
// readOnlyUrls: {
// 80001: "https://rpc-mumbai.maticvigil.com",
// [ChainId.Hardhat]: "http://127.0.0.1:8545",
// },
// supportedChains: [80001],
// supportedChains: [31337],
// multicallAddresses: {
// 80001: "0x935Bfe9AfaA2Be26049ea4EDE40A3A2243361F87",
// 31337: "0x935Bfe9AfaA2Be26049ea4EDE40A3A2243361F87",
// },
// };

const config = {
readOnlyChainId: 80001,
readOnlyUrls: {
80001: "https://rpc-mumbai.maticvigil.com",
},
supportedChains: [80001],
multicallAddresses: {
80001: "0x935Bfe9AfaA2Be26049ea4EDE40A3A2243361F87",
},
};

ReactDOM.render(
<React.StrictMode>
<DAppProvider config={config}>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/utils/contracts-utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const contracts = {
"TokenPack": {
"address": "0xb4e9A5BC64DC07f890367F72941403EEd7faDCbB",
"address": "0xb5d79FA12a4BC71c0a48E8784D2FC8b5B4172Dd0",
"abi": [
{
"inputs": [
Expand Down Expand Up @@ -386,7 +386,7 @@ export const contracts = {
]
},
"Token": {
"address": "0x88f7BcdaD58029Ab9dECC14269232452b74834B6",
"address": "0x39aC18F547ce1bdA85F417247e12935299842e5f",
"abi": [
{
"inputs": [
Expand Down Expand Up @@ -1106,7 +1106,7 @@ export const contracts = {
]
},
"Blueprint": {
"address": "0xC99a1b8E114903E034D50E08fDA79cC5cee08f28",
"address": "0xc9546c96a69da6A28902B3A9C92896dF62FCEB2a",
"abi": [
{
"anonymous": false,
Expand Down

0 comments on commit 35420cf

Please sign in to comment.