@@ -17,14 +17,14 @@ import {
1717 GetTransactionStatusResponse ,
1818 GetTransactionTraceResponse ,
1919 Invocation ,
20- TransactionReceipt ,
20+ TransactionReceiptResponse ,
2121} from '../types' ;
2222import { getSelectorFromName } from '../utils/hash' ;
2323import { parse , stringify } from '../utils/json' ;
2424import { BigNumberish , bigNumberishArrayToDecimalStringArray , toBN , toHex } from '../utils/number' ;
2525import { compressProgram , randomAddress } from '../utils/stark' ;
2626import { ProviderInterface } from './interface' ;
27- import { BlockIdentifier , getFormattedBlockIdentifier , txIdentifier } from './utils' ;
27+ import { BlockIdentifier , getFormattedBlockIdentifier } from './utils' ;
2828
2929type NetworkName = 'mainnet-alpha' | 'goerli-alpha' ;
3030
@@ -272,22 +272,12 @@ export class Provider implements ProviderInterface {
272272 * [Reference] (https://github.com/starkware-libs/cairo-lang/blob/master/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L104-L111)
273273 *
274274 * @param txHash
275- * @param txId
276275 * @returns the transaction receipt object
277276 */
278277
279- public async getTransactionReceipt ( {
280- txHash,
281- txId,
282- } : {
283- txHash ?: BigNumberish ;
284- txId ?: BigNumberish ;
285- } ) : Promise < TransactionReceipt > {
286- const { data } = await axios . get < TransactionReceipt > (
287- urljoin ( this . feederGatewayUrl , 'get_transaction_receipt' , `?${ txIdentifier ( txHash , txId ) } ` )
288- ) ;
289-
290- return data ;
278+ public async getTransactionReceipt ( txHash : BigNumberish ) : Promise < TransactionReceiptResponse > {
279+ const txHashHex = toHex ( toBN ( txHash ) ) ;
280+ return this . fetchEndpoint ( 'get_transaction_receipt' , { transactionHash : txHashHex } ) ;
291281 }
292282
293283 /**
0 commit comments