-
Notifications
You must be signed in to change notification settings - Fork 50
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
Conversation
apps/wallet-mobile/src/yoroi-wallets/cardano/shelley/signatureUtils.ts
Outdated
Show resolved
Hide resolved
...-mobile/src/features/Swap/common/ConfirmWithSpendingPassword/ConfirmWithSpendingPassword.tsx
Outdated
Show resolved
Hide resolved
apps/wallet-mobile/src/features/Swap/useCases/StartSwapScreen/ListOrders/helpers.ts
Show resolved
Hide resolved
return CardanoMobile.TransactionBuilder.new(assertRequired(txBuilderCfg, 'Could not build transaction builder')) | ||
} | ||
|
||
const operations1 = Object.values({ |
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
Resolves YOMO-750
Note this PR does not have HW wallet support yet.