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

feat(swap): Allow cancellation of an open order #2683

Merged
merged 104 commits into from
Sep 29, 2023
Merged

Conversation

michaeljscript
Copy link
Collaborator

@michaeljscript michaeljscript commented Sep 13, 2023

Resolves YOMO-750

Note this PR does not have HW wallet support yet.

@michaeljscript michaeljscript removed the blocked Blocked label Sep 14, 2023
return CardanoMobile.TransactionBuilder.new(assertRequired(txBuilderCfg, 'Could not build transaction builder'))
}

const operations1 = Object.values({
Copy link
Contributor

Choose a reason for hiding this comment

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

I would move it in separate file with all protocol params

return value
}

export const fixScriptHash = async (tx: CSL_TYPES.Transaction) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can recalculate script hash without building tx by tx builder. There is function hash_script_data that you can use

import {CardanoMobile} from '../../wallets'

export const signRawTransaction = async (txHex: string, pKeys: PrivateKey[]): Promise<Uint8Array> => {
const fixedTx = await CardanoMobile.FixedTransaction.fromHex(txHex)
Copy link
Contributor

Choose a reason for hiding this comment

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

it you have byte array you can call fromBytes

@stackchain stackchain merged commit 27fb1e4 into develop Sep 29, 2023
@stackchain stackchain deleted the feat/swap-cancel branch September 29, 2023 09:40
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