def do_withdraw(self, arguments): if not self.Wallet: print("Please open a wallet") return item = get_arg(arguments, 0) if item: if item == 'holds': PrintHolds(self.Wallet) elif item == 'delete_holds': index_to_delete = -1 if get_arg(arguments, 1) and int(get_arg(arguments, 1)) > -1: index_to_delete = int(get_arg(arguments, 1)) DeleteHolds(self.Wallet, index_to_delete) elif item == 'cancel_holds': if len(arguments) > 1: CancelWithdrawalHolds(self.Wallet, get_arg(arguments, 1)) else: print("Please specify contract hash to cancel holds for") elif item == 'completed': ShowCompletedHolds(self.Wallet) elif item == 'cleanup': CleanupCompletedHolds(self.Wallet) elif item == 'all': WithdrawAll(self.Wallet) else: WithdrawOne(self.Wallet)
def test_2_print(self): wallet = self.GetWallet1() ShowCompletedHolds(wallet) PrintHolds(wallet)