Skip to content

Commit

Permalink
fix: contract
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillermo Alejandro Gallardo Diez authored and Guillermo Alejandro Gallardo Diez committed Jan 6, 2025
1 parent db34559 commit 7b62e51
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 3 additions & 3 deletions contract-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ crate-type = ["cdylib", "rlib"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
near-sdk = { version = "5.1.0", features = ["legacy"] }
near-sdk = { version = "5.7.0", features = ["legacy"] }

[dev-dependencies]
near-sdk = { version = "5.0.0", features = ["unit-testing"] }
near-workspaces = { version = "0.10.0", features = ["unstable"] }
near-sdk = { version = "5.7.0", features = ["unit-testing"] }
near-workspaces = { version = "0.16.0", features = ["unstable"] }
tokio = { version = "1.12.0", features = ["full"] }
serde_json = "1"

Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/DonationForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const DonationForm = ({ setMyDonation }) => {
event.preventDefault();

let deposit = utils.format.parseNearAmount(amount.toString());
setMyDonation(amount);

wallet
.callMethod({
contractId: DonationNearContract,
Expand All @@ -32,6 +32,8 @@ const DonationForm = ({ setMyDonation }) => {
.catch(() => {
setMyDonation(-Number(amount));
});

setMyDonation(amount);
};

return (
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import { DonationNearContract, NetworkId } from "@/config";
// Wallet instance
const wallet = new Wallet({ networkId: NetworkId });

// Optional: Create an access key so the user does not need to sign transactions. Read more about access keys here: https://docs.near.org/concepts/protocol/access-keys
// const wallet = new Wallet({
// createAccessKeyFor: DonationNearContract,
// networkId: NetworkId,
// });

export default function MyApp({ Component, pageProps }) {
const [signedAccountId, setSignedAccountId] = useState("");

Expand Down

0 comments on commit 7b62e51

Please # to comment.