Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QiHDWallet: add new method signature for sendTransaction() using paymentCodes #304

Merged

Conversation

alejoacosta74
Copy link
Contributor

No description provided.

Comment on lines +246 to +266
public async sendTransaction(tx: QiTransactionRequest): Promise<TransactionResponse>;

/**
* Sends a transaction using payment codes and specific parameters.
*
* @param recipientPaymentCode The payment code of the recipient.
* @param amount The amount to send.
* @param originZone The origin zone of the transaction.
* @param destinationZone The destination zone of the transaction.
*/
public async sendTransaction(
recipientPaymentCode: string,
amount: bigint,
originZone: Zone,
destinationZone: Zone,
): Promise<TransactionResponse>;

/**
* Implementation of the sendTransaction method.
*/
public async sendTransaction(...args: any[]): Promise<TransactionResponse> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of overloading the sendTransaction method I think it would be better to change the QiTransactionRequest to be our desired form of a transaction request which is recipientPaymentCode, amount, originZone, destinationZone.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As agreed, lets save the suggested change for future optimizations, since modifying QiTransactionRequest impacts several files.

@rileystephens28 rileystephens28 merged commit 4f90044 into dominant-strategies:alpha Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants