@@ -2,6 +2,7 @@ import React, { useState } from 'react';
22import { Grid, Text } from 'indigo-react';
33
44import { useLocalRouter } from 'lib/LocalRouter';
5+import { COMMANDS, useFlowCommand } from 'lib/flowCommand';
56
67import View from 'components/View';
78import Highlighted from 'components/Highlighted';
@@ -23,6 +24,7 @@ import { composeValidator, buildPsbtValidator } from 'form/validators';
2324export default function SignTransaction() {
2425 const { pop } = useLocalRouter();
2526 const { urbitWallet } = useWallet();
27+ const flow = useFlowCommand();
2628
2729 const [signedTx, setSignedTx] = useState('');
2830 const [psbt, setPsbt] = useState({});
@@ -64,13 +66,21 @@ export default function SignTransaction() {
6466 setSignedTx(hex);
6567 };
6668
69+ const initialValues = {};
70+ if (COMMANDS.BITCOIN === flow.kind) {
71+ initialValues.unsignedTransaction = flow.utx;
72+ }
73+
6774 return (
6875 <View pop={pop} inset>
6976 <Grid className="mt4">
7077 <Grid.Item full className="mt4" as={Text}>
7178 Paste unsigned transactions from Landscape here
7279 </Grid.Item>
73− <BridgeForm validate={validate} onSubmit={onSubmit}>
80+ <BridgeForm
81+ validate={validate}
82+ initialValues={initialValues}
83+ onSubmit={onSubmit}>
7484 {({ handleSubmit }) => (
7585 <>
7686 <Grid.Item