From c25497e07e03d4c4f4f63429f7ea851bf4be804b Mon Sep 17 00:00:00 2001 From: egemenkus Date: Wed, 15 Nov 2023 16:07:54 +0300 Subject: [PATCH] Fix --- 3.restricted-mint-multisig/imports/multisig.leo | 8 ++++++++ 4.kyc/src/main.leo | 1 + 2 files changed, 9 insertions(+) diff --git a/3.restricted-mint-multisig/imports/multisig.leo b/3.restricted-mint-multisig/imports/multisig.leo index 1652050..5ff108f 100644 --- a/3.restricted-mint-multisig/imports/multisig.leo +++ b/3.restricted-mint-multisig/imports/multisig.leo @@ -5,6 +5,7 @@ program multisig.aleo { mapping required_signatures: bool => u64; mapping proposals: Proposal => u64; mapping signers: address => bool; + mapping signed : Signed => bool; struct Proposal { program_address: address, @@ -12,6 +13,11 @@ program multisig.aleo { args_hash: field, } + struct Signed { + signer: address, + proposal : Proposal, + } + record ticket { owner: address, program_address: address, @@ -41,8 +47,10 @@ program multisig.aleo { finalize sign(caller: address, proposal: Proposal) { assert(Mapping::get(signers, caller)); + Mapping::get(signed, Signed { signer: caller, proposal: proposal }); let signatures: u64 = Mapping::get_or_use(proposals, proposal, 0u64); Mapping::set(proposals, proposal, signatures + 1u64); + Mapping::set(signed, Signed { signer: caller, proposal: proposal }, true); } transition add_signer(ticket_: ticket, new_signer: address) { diff --git a/4.kyc/src/main.leo b/4.kyc/src/main.leo index 85a6846..74101c0 100644 --- a/4.kyc/src/main.leo +++ b/4.kyc/src/main.leo @@ -51,6 +51,7 @@ program token.aleo { } transition register_zpass(identity_: zpass.leo/identity.record) -> kyc { + // Check user is bigger than 17 assert(identity_.age >= 18u8); if (identity_.nationality == 1field) {