Skip to content

Commit

Permalink
Fix SubscribeTransactionStatus with new Juno update
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagodeev committed Jan 31, 2025
1 parent 4cf22d8 commit 03ba2e3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions rpc/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,9 @@ func (provider *WsProvider) SubscribePendingTransactions(ctx context.Context, pe
// - clientSubscription: The client subscription object, used to unsubscribe from the stream and to get errors
// - error: An error, if any
func (provider *WsProvider) SubscribeTransactionStatus(ctx context.Context, newStatus chan<- *NewTxnStatusResp, transactionHash *felt.Felt) (*client.ClientSubscription, error) {
sub, err := provider.c.SubscribeWithSliceArgs(ctx, "starknet", "_subscribeTransactionStatus", newStatus, transactionHash, WithBlockTag("latest"))
sub, err := provider.c.SubscribeWithSliceArgs(ctx, "starknet", "_subscribeTransactionStatus", newStatus, transactionHash)
if err != nil {
return nil, tryUnwrapToRPCErr(err, ErrTooManyBlocksBack, ErrBlockNotFound)
return nil, tryUnwrapToRPCErr(err)
}
// TODO: wait for Juno to implement this. This is the correct implementation by the spec
// sub, err := provider.c.SubscribeWithSliceArgs(ctx, "starknet", "_subscribeTransactionStatus", newStatus, transactionHash)
// if err != nil {
// return nil, tryUnwrapToRPCErr(err)
// }
return sub, nil
}

0 comments on commit 03ba2e3

Please sign in to comment.