Skip to content

[Import Transaction] signatures#2094

Open
jeesunikim wants to merge 3 commits into
mainfrom
import-tx-sign-backup
Open

[Import Transaction] signatures#2094
jeesunikim wants to merge 3 commits into
mainfrom
import-tx-sign-backup

Conversation

@jeesunikim
Copy link
Copy Markdown
Contributor

@jeesunikim jeesunikim commented May 18, 2026

Few scenarios:

  • [Classic] When signatures are valid against the source account of the tx, the bottom CTA directs users to "submit"
  • [Soroban] Importing simulated and signed Soroban transaction: should display "submit" in the bottom CTA instead of the default "simulate" because simulating discard the existing signatures

Copilot AI review requested due to automatic review settings May 18, 2026 19:40
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX May 18, 2026
@stellar-jenkins-ci
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an imported-transaction signature viewer and adjusts the Import flow footer so users can skip directly to submission when an imported classic transaction already contains signatures.

Changes:

  • Add a new Signatures component to display decorated signatures and best-effort offline signer matching/verification.
  • Introduce getRequiredSigners helper to derive per-envelope “possible signers” (outer/inner for fee-bumps).
  • Extend TransactionFlowFooter with a nextOverride to customize the primary action on specific steps (used by Import).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/styles/globals.scss Adds info-message styling used by the new signatures UI.
src/helpers/checkRequiredSignatures.ts New helper deriving per-envelope required/possible signer accounts and hashes.
src/components/TransactionFlowFooter/index.tsx Adds nextOverride support to replace the default Next button.
src/app/(sidebar)/transaction/styles.scss Adds .Signatures table styling for transaction flows.
src/app/(sidebar)/transaction/import/page.tsx Uses nextOverride to default classic imports with signatures to “Submit transaction”.
src/app/(sidebar)/transaction/import/components/ImportStepContent.tsx Renders the new Signatures component when signatures are present.
src/app/(sidebar)/transaction/components/Signatures.tsx New signatures table + offline verification/status UI for imported transactions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +100 to +102
parsedTxType === "classic" &&
Boolean(importState?.hasSignatures) &&
Boolean(importState?.importXdr);
isClassicReadyToSubmit
? {
label: "Submit transaction",
onClick: handleSkipToSubmit,
Comment on lines +134 to 135
const hasSignatures = Boolean(parsedTx?.signatures.length);

Comment on lines +22 to +25
* Optional overrides let a flow customize the primary Next button (label
* + handler) and surface a secondary action — used by the Import flow to
* default to "Submit transaction" when the imported tx is already valid,
* while still offering "Sign transaction" alongside.
Comment on lines +31 to +56
export const getRequiredSigners = (
tx: Transaction | FeeBumpTransaction,
): EnvelopeRequirement[] => {
if (tx instanceof FeeBumpTransaction) {
const inner = tx.innerTransaction;
return [
{
envelope: "outer",
signers: [getPublicKey(tx.feeSource)],
hash: tx.hash(),
},
{
envelope: "inner",
signers: collectTxSigners(inner),
hash: inner.hash(),
},
];
}
return [
{
envelope: "outer",
signers: collectTxSigners(tx),
hash: tx.hash(),
},
];
};
Comment on lines +58 to +129
// =============================================================================
// Signatures
// =============================================================================
.Signatures {
color: var(--sds-clr-gray-11);

&__cell {
&[data-is-header="true"] {
text-align: left;
font-size: pxToRem(12px);
line-height: pxToRem(18px);
color: var(--sds-clr-gray-11);
}

&[data-is-signature="true"] {
white-space: normal;
word-break: break-all;
overflow-wrap: break-word;
font-family: var(--sds-ff-monospace), monospace;
}
}

&__gridTableContainer {
width: 100%;
overflow-y: auto;

border: 1px solid var(--sds-clr-gray-06);
border-radius: pxToRem(8px);
background-color: var(--sds-clr-base-00);

table {
tr {
display: grid;
grid-template-columns:
minmax(pxToRem(160px), 1fr)
minmax(pxToRem(160px), 1fr)
minmax(pxToRem(160px), 1fr);

&[data-is-highlighted="true"] {
background-color: var(--sds-clr-gray-03);
}
}

td,
th {
display: flex;
flex-direction: column;
padding: pxToRem(8px) pxToRem(12px);
justify-content: center;

&:not(:last-child) {
border-right: 1px solid var(--sds-clr-gray-06);
}

.Badge {
--Badge-padding-vertical: 0;
--Badge-padding-horizontal: #{pxToRem(6px)};

font-family: var(--sds-ff-monospace), monospace;
letter-spacing: pxToRem(-0.24px);
}
}

tbody {
tr {
border-top: 1px solid var(--sds-clr-gray-06);
}
}
}
}
}

@stellar-jenkins-ci
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog (Not Ready)

Development

Successfully merging this pull request may close these issues.

2 participants