diff --git a/internal/tezos/get_receipt.go b/internal/tezos/get_receipt.go index d702203..4ea6822 100644 --- a/internal/tezos/get_receipt.go +++ b/internal/tezos/get_receipt.go @@ -32,12 +32,14 @@ type receiptExtraInfo struct { // TransactionReceipt queries to see if a receipt is available for a given transaction hash func (c *tezosConnector) TransactionReceipt(ctx context.Context, req *ffcapi.TransactionReceiptRequest) (*ffcapi.TransactionReceiptResponse, ffcapi.ErrorReason, error) { + opts := &rpc.DefaultOptions + // ensure block observer is running rpcClient := c.client.(*rpc.Client) rpcClient.Listen() // wait for confirmations - res := rpc.NewResult(tezos.MustParseOpHash(req.TransactionHash)) // .WithTTL(op.TTL).WithConfirmations(opts.Confirmations) + res := rpc.NewResult(tezos.MustParseOpHash(req.TransactionHash)).WithTTL(opts.TTL).WithConfirmations(opts.Confirmations) res.Listen(rpcClient.BlockObserver) res.WaitContext(ctx) if err := res.Err(); err != nil { diff --git a/tezosconnect_config.yml b/tezosconnect_config.yml index c0cccf6..e6102e5 100644 --- a/tezosconnect_config.yml +++ b/tezosconnect_config.yml @@ -16,6 +16,7 @@ ffcore: - tezos confirmations: required: 0 + fetchReceiptUponEntry: true transactions: handler: name: simple