Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion cmd/transaction/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func init() {
SendMoney Command
*/
sendMoneyCmd.Flags().Int64Var(&sendAmount, "amount", 0, "Amount of money we want to send")
sendMoneyCmd.Flags().BoolVar(&escrow, "escrow", false, "Escrowable transaction ? need approver-address if yes")
sendMoneyCmd.Flags().BoolVar(&escrow, "escrow", true, "Escrowable transaction ? need approver-address if yes")
sendMoneyCmd.Flags().StringVar(&esApproverAddress, "approver-address", "", "Escrow fields: Approver account address")
sendMoneyCmd.Flags().Uint64Var(&esTimeout, "timeout", 0, "Escrow fields: Timeout transaction id")
sendMoneyCmd.Flags().Int64Var(&esCommission, "commission", 0, "Escrow fields: Commission")
Expand Down
1 change: 1 addition & 0 deletions common/transaction/approvalEscrowTransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ func (tx *ApprovalEscrowTransaction) ApplyConfirmed(blockTimestamp int64) error
return blocker.NewBlocker(blocker.AppErr, "TransactionNotFound")

}
transaction.Height = tx.Height
transaction.Escrow = &latestEscrow

txType, err = tx.TypeActionSwitcher.GetTransactionType(&transaction)
Expand Down
9 changes: 1 addition & 8 deletions common/transaction/sendMoney.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ account ledger, and escrow
func (tx *SendMoney) EscrowApplyConfirmed(blockTimestamp int64) error {
var (
queries [][]interface{}
block *model.Block
err error
)

Expand All @@ -425,12 +424,7 @@ func (tx *SendMoney) EscrowApplyConfirmed(blockTimestamp int64) error {
senderAccountLedgerArgs = append([]interface{}{senderAccountLedgerQ}, senderAccountLedgerArgs...)
queries = append(queries, senderAccountLedgerArgs)

// Insert Escrow
block, err = util.GetLastBlock(tx.QueryExecutor, tx.BlockQuery)
if err != nil {
return blocker.NewBlocker(blocker.ValidationErr, err.Error())
}
tx.Escrow.Timeout += uint64(block.GetHeight())
tx.Escrow.Timeout += uint64(tx.Height)
escrowArgs := tx.EscrowQuery.InsertEscrowTransaction(tx.Escrow)
queries = append(queries, escrowArgs...)

Expand All @@ -453,7 +447,6 @@ func (tx *SendMoney) EscrowApproval(
queries [][]interface{}
err error
)
fmt.Printf("EscrowApproval")

switch txBody.GetApproval() {
case model.EscrowApproval_Approve:
Expand Down