Exemplo n.º 1
0
// MutateTransaction for PaymentBuilder causes the underylying PaymentOp
// to be added to the operation list for the provided transaction
func (m PaymentBuilder) MutateTransaction(o *xdr.Transaction) error {
	if m.Err != nil {
		return m.Err
	}

	m.O.Body = xdr.NewOperationBodyPayment(m.P)
	o.Operations = append(o.Operations, m.O)
	return nil
}
Exemplo n.º 2
0
// MutateTransaction for CreateAccountBuilder causes the underylying
// CreateAccountOp to be added to the operation list for the provided
// transaction
func (m CreateAccountBuilder) MutateTransaction(o *xdr.Transaction) error {
	if m.Err != nil {
		return m.Err
	}

	m.O.Body = xdr.NewOperationBodyCreateAccount(m.CA)
	o.Operations = append(o.Operations, m.O)
	return nil
}