diff --git a/suave/sdk/sdk.go b/suave/sdk/sdk.go index c04b69ca04..2aebf7173d 100644 --- a/suave/sdk/sdk.go +++ b/suave/sdk/sdk.go @@ -104,11 +104,15 @@ type TransactionResult struct { } func (t *TransactionResult) Wait() (*types.Receipt, error) { + return t.WaitWithTimeout(10 * time.Second) +} + +func (t *TransactionResult) WaitWithTimeout(timeout time.Duration) (*types.Receipt, error) { if t.receipt != nil { return t.receipt, nil } - timer := time.NewTimer(10 * time.Second) + timer := time.NewTimer(timeout) var receipt *types.Receipt var err error