Skip to content

Conversation

@towanTG
Copy link
Collaborator

@towanTG towanTG commented Oct 10, 2025

No description provided.

@towanTG towanTG requested a review from ice-chillios October 10, 2025 10:50
chain === Chain.BitcoinCash
? (toolbox as UTXOToolboxes["BCH"]).buildTx
: (toolbox as UTXOToolboxes["BTC"]).createTransaction;
const createTxMethod = (toolbox as UTXOToolboxes["BTC"]).createTransaction;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I need to fix this up real quick 👁️ 👁️

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah maybe not

Copy link
Collaborator

@ice-chillios ice-chillios left a comment

Choose a reason for hiding this comment

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

Beauty ;)

Free to merge after restoring BCH ;)

Copy link
Collaborator

@olegpetroveth olegpetroveth left a comment

Choose a reason for hiding this comment

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

Is there a playground on which I can test this swap plugin?


const isEVMTransaction = (tx: unknown) => EVMTransactionSchema.safeParse(tx).success;
const isTronTransaction = (tx: unknown) => TronTransactionSchema.safeParse(tx).success;
const isCosmosTransaction = (tx: unknown) => CosmosTransactionSchema.safeParse(tx).success;
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we have isUtxoTransaction , Near and Solana helpers too?

Copy link
Collaborator

@ice-chillios ice-chillios Oct 16, 2025

Choose a reason for hiding this comment

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

No - those falls into generic type afaik

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is just testing the tx that API sends, against the schemas I copied from the API repo to have type safety

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So no need for the API to have access to that, that would be kinda ... in a circle.

API defines types
SDK manually has to copy them
API uses manually copied types to check their own types

Copy link
Collaborator

Choose a reason for hiding this comment

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

It supposed to be taken from API typings like openapi or sth - but we never got those in place

@towanTG
Copy link
Collaborator Author

towanTG commented Oct 16, 2025

Is there a playground on which I can test this swap plugin?

Its the deployment I am building for Ochhii

@ice-chillios ice-chillios marked this pull request as draft October 28, 2025 11:34
@ice-chillios ice-chillios self-requested a review October 28, 2025 11:34
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.

4 participants