| 136 | } |
| 137 | |
| 138 | func (a *API) submitSingle(ctx context.Context, tpl *txbuilder.Template, waitUntil string) (interface{}, error) { |
| 139 | if tpl.Transaction == nil { |
| 140 | return nil, errors.Wrap(txbuilder.ErrMissingRawTx) |
| 141 | } |
| 142 | |
| 143 | err := a.finalizeTxWait(ctx, tpl, waitUntil) |
| 144 | if err != nil { |
| 145 | return nil, errors.Wrapf(err, "tx %s", tpl.Transaction.ID.String()) |
| 146 | } |
| 147 | |
| 148 | return map[string]string{"id": tpl.Transaction.ID.String()}, nil |
| 149 | } |
| 150 | |
| 151 | // recordSubmittedTx records a lower bound height at which the tx |
| 152 | // was first submitted to the tx pool. If this request fails for |