-
Notifications
You must be signed in to change notification settings - Fork 99
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
[Build Tx] Add a Soroban Operation - Extend TTL #1226
Conversation
Preview is available here: |
Preview is available here: |
Preview is available here: |
Preview is available here: |
Preview is available here: |
if (isSorobanOperationType(e.target.value)) { | ||
updateSorobanBuildOperation({ | ||
operation_type: e.target.value, | ||
params: defaultParams, | ||
source_account: "", | ||
}); | ||
} else { | ||
updateBuildSingleOperation(index, { | ||
operation_type: e.target.value, | ||
params: defaultParams, | ||
source_account: "", | ||
}); | ||
resetSorobanOperation(); | ||
} |
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.
We also need to reset the Classic operations when working with a Soroban operation.
src/app/(sidebar)/transaction/build/components/SorobanTransactionXdr.tsx
Outdated
Show resolved
Hide resolved
return operations.some((op: DecodedOperation) => { | ||
const body = op?.body; | ||
if (!body) { | ||
return false; | ||
} | ||
|
||
const sorobanOps = [ | ||
body.extend_footprint_ttl, | ||
body.restore_footprint, | ||
body.invoke_host_function, | ||
]; | ||
|
||
return sorobanOps.some((op) => op?.ext === "v0"); | ||
}); |
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.
Could you please add more details for this logic here? I'm not sure I fully understand it. 😊
case "key": | ||
return { | ||
render: (templ: { | ||
value: string | undefined; | ||
error: string | undefined; | ||
onChange: (val: any) => void; | ||
disabled?: boolean; |
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.
Why can't we leave disabled here? There might be cases where we need that.
src/helpers/sorobanUtils.ts
Outdated
if (!readOnlyXdrLedgerKey && !readWriteXdrLedgerKey) { | ||
return; | ||
} |
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.
Should we check for length here since we're setting default values as empty arrays?
I'll create smaller new PRs tomorrow |
Preview is available here: |
Add Soroban Operation - Extend TTL
includes:
fetch minimum resource fee
button that simulates tx and calculates the resource feekey-xdr
(cli doc) (as recommended by dima)rpc
if it's a soroban txOperation
createStore
to include a separate soroban object that storesxdr
andparams
saved
page