Skip to content

Commit 2f8d4b8

Browse files
authored
Merge pull request #51 from krishnaacharyaa/BugFix-40-Krishna
[BugFix - getDonators and donateToCampaign give errors #40]
2 parents a554d7e + 95aaa03 commit 2f8d4b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/src/context/index.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ export const StateContextProvider = ({ children }) => {
5656
}
5757

5858
const donate = async (pId, amount) => {
59-
const data = await contract.call('donateToCampaign', pId, { value: ethers.utils.parseEther(amount)});
59+
const data = await contract.call('donateToCampaign', [pId], { value: ethers.utils.parseEther(amount)});
6060

6161
return data;
6262
}
6363

6464
const getDonations = async (pId) => {
65-
const donations = await contract.call('getDonators', pId);
65+
const donations = await contract.call('getDonators', [pId]);
6666
const numberOfDonations = donations[0].length;
6767

6868
const parsedDonations = [];

0 commit comments

Comments
 (0)