Skip to content

Commit

Permalink
chore: update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
quanghuynguyen1902 committed Jan 3, 2023
1 parent 270b0fe commit f25c3d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion programs/superteam-dao-contract/src/schemas/proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ pub struct Proposal {
pub recipient: Pubkey,
pub sender: Pubkey,
pub status: u8,
pub tags: String,
pub transaction: Option<String>,
pub image: String,
pub title: String,
pub subtitle: String,
pub spl: Pubkey,
pub amount: u64,
pub tags: String,
pub identifier: u64,
}

Expand Down
10 changes: 5 additions & 5 deletions tests/superteam-dao-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe("superteam-dao-contract", () => {
[proposalAccount, proposalAccountBump] = await findPDAProposal(sender.publicKey, identifierData.count, program)

await program.methods.createProposal(recipient.publicKey, "https://upload.wikimedia.org/wikipedia/en/b/b9/Solana_logo.png",
"Solana Coding Camp Winner", "", mintA.publicKey, "solanacamp", new BN(100*(10**MINT_A_DECIMALS)))
"Orca summer Winner", "", mintA.publicKey, "gamefi", new BN(100*(10**MINT_A_DECIMALS)))
.accounts({
proposal: proposalAccount,
identifier: identifierAccount,
Expand All @@ -96,7 +96,7 @@ describe("superteam-dao-contract", () => {
[proposalAccount1, proposalAccountBump1] = await findPDAProposal(sender.publicKey, identifierData.count, program)

await program.methods.createProposal(recipient.publicKey, "https://upload.wikimedia.org/wikipedia/en/b/b9/Solana_logo.png",
"Solana Coding Camp 2nd", "", mintA.publicKey, "solanacamp", new BN(100*(10**MINT_A_DECIMALS)))
"Orca summer 2nd", "", mintA.publicKey, "defi", new BN(100*(10**MINT_A_DECIMALS)))
.accounts({
proposal: proposalAccount1,
identifier: identifierAccount,
Expand All @@ -116,7 +116,7 @@ describe("superteam-dao-contract", () => {
[proposalAccount2, proposalAccountBump2] = await findPDAProposal(sender.publicKey, identifierData.count, program)

await program.methods.createProposal(recipient.publicKey, "https://upload.wikimedia.org/wikipedia/en/b/b9/Solana_logo.png",
"Solana Coding Camp 3rd", "", mintA.publicKey, "solanacamp", new BN(100*(10**MINT_A_DECIMALS)))
"Orca summer 3rd", "", mintA.publicKey, "orca", new BN(100*(10**MINT_A_DECIMALS)))
.accounts({
proposal: proposalAccount2,
identifier: identifierAccount,
Expand Down Expand Up @@ -223,7 +223,7 @@ describe("superteam-dao-contract", () => {
});

it("filter proposal by sender ", async () => {
let sender = new PublicKey("Dv8z4g6azCswAFhRETfnTd1UpTE68ZdRswwctMEhR285");
let sender = new PublicKey("J831y4jyRXukQrhLSKg8fY4nNUdzRXzgw7jHuMzKRP81");
const proposalBySender = await program.account.proposal.all([
{
memcmp: {
Expand All @@ -238,7 +238,7 @@ describe("superteam-dao-contract", () => {
});

it("filter proposal by recipient ", async () => {
let recipient = new PublicKey("AyeFqRkAwhjrmpDsd2e2MgckBjrhWEexj9py69UGxLke");
let recipient = new PublicKey("CsYj7vtRvE9ZaFghEQqA7JdaBxvPkeFWc2ucNuz8PoWU");
const proposalByRecipient = await program.account.proposal.all([
{
memcmp: {
Expand Down

0 comments on commit f25c3d7

Please sign in to comment.