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

Remove slow wallet check when completing a community transfer #1211

Open
wants to merge 4 commits into
base: v6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
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
5 changes: 0 additions & 5 deletions diem-move/diem-framework/DPN/sources/0L/Wallet.move
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ module Wallet {
public fun new_timed_transfer(
sender: &signer, payee: address, value: u64, description: vector<u8>
): u64 acquires CommunityTransfers, CommunityWalletList {
// firstly check if payee is a slow wallet
// TODO: This function should check if the account is a slow wallet before sending
// but there's a circular dependency with DiemAccount which has the slow wallet struct.
// curretly we move that check to the transaction script to initialize the payment.
// assert!(DiemAccount::is_slow(payee), EIS_NOT_SLOW_WALLET);

let sender_addr = Signer::address_of(sender);
let list = get_comm_list();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ module TransferScripts {
let sender_addr = Signer::address_of(&sender);
assert!(Wallet::is_comm(sender_addr), 30001);

// confirm the destination account has a slow wallet
// TODO: this check only happens in this script since there's
// a circular dependecy issue with DiemAccount and Wallet which impedes
// checking in Wallet module
assert!(DiemAccount::is_slow(destination), 30002);

let uid = Wallet::new_timed_transfer(&sender, destination, value, memo);
assert!(Wallet::transfer_is_proposed(uid), 30003);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ script {

fun main(_dr: signer, bob: signer) {
// Genesis creates 6 validators by default which are already slow wallets,
// adding Bob
DiemAccount::set_slow(&bob);
0xzoz marked this conversation as resolved.
Show resolved Hide resolved
let list = DiemAccount::get_slow_list();
assert!(Vector::length<address>(&list) == 7, 735701);
}
Expand Down