Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for latest libraries #163

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reveal/uncomment code that has no signatures
  • Loading branch information
pselle committed Jun 27, 2024
commit 9fb1db2ec9cdad5b7fbb0dc946a441b15e6eddc3
42 changes: 21 additions & 21 deletions components/organisms/pledge/index.tsx
Original file line number Diff line number Diff line change
@@ -29,29 +29,29 @@ const Pledge: FunctionComponent = () => {
target: BigInt
}>()

// React.useEffect(() => {
// Promise.all([
// abundanceContract.balance({ id: crowdfundContract.contractId }),
// abundanceContract.decimals(),
// abundanceContract.name(),
// abundanceContract.symbol(),
React.useEffect(() => {
Promise.all([
abundanceContract.balance({ id: crowdfundContract.contractId }),
abundanceContract.decimals(),
abundanceContract.name(),
abundanceContract.symbol(),

// crowdfundContract.deadline(),
// crowdfundContract.target(),
// ]).then(fetched => {
// setAbundance({
// balance: fetched[0],
// decimals: fetched[1],
// name: fetched[2].toString(),
// symbol: fetched[3].toString(),
// })
crowdfundContract.deadline(),
crowdfundContract.target(),
]).then(fetched => {
setAbundance({
balance: fetched[0],
decimals: fetched[1],
name: fetched[2].toString(),
symbol: fetched[3].toString(),
})

// setCrowdfund({
// deadline: new Date(Number(fetched[4]) * 1000),
// target: fetched[5],
// })
// })
// }, [updatedAt])
setCrowdfund({
deadline: new Date(Number(fetched[4]) * 1000),
target: fetched[5],
})
})
}, [updatedAt])

const [targetReached, setTargetReached] = useState<boolean>(false)