Skip to content

Commit 10a6f11

Browse files
authored
feat: add from/to to confirmation (#563)
1 parent 71b9e35 commit 10a6f11

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

packages/snap/snap.manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"version": "1.4.5",
2+
"version": "1.5.0",
33
"description": "Manage Bitcoin using MetaMask",
44
"proposedName": "Bitcoin",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/MetaMask/snap-bitcoin-wallet.git"
88
},
99
"source": {
10-
"shasum": "nGyqPBVxGl7PFfJfi2eo+6zuj0ExrR55GPcK8mKy/lU=",
10+
"shasum": "j9W3ulkpAGrL0lkkChX7wavGEY3qq6nCf4lQ0KmmF78=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",

packages/snap/src/infra/jsx/unified-send-flow/UnifiedSendFormView.tsx

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export const UnifiedSendFormView: SnapComponent<UnifiedSendFormViewProps> = ({
3535
messages,
3636
}) => {
3737
const t = translate(messages);
38-
const { amount, exchangeRate, network, from, explorerUrl } = context;
38+
const { amount, exchangeRate, network, from, recipient, explorerUrl } =
39+
context;
3940

4041
const psbt = Psbt.from_string(context.psbt);
4142
const fee = psbt.fee().to_sat();
@@ -87,7 +88,7 @@ export const UnifiedSendFormView: SnapComponent<UnifiedSendFormViewProps> = ({
8788
<Box>{null}</Box>
8889
<Box alignment="space-between" direction="horizontal">
8990
<SnapText fontWeight="medium" color="alternative">
90-
{t('confirmation.account')}
91+
{t('from')}
9192
</SnapText>
9293
{isValidSnapLinkProtocol(explorerUrl) ? (
9394
<Link href={displayExplorerUrl(explorerUrl, from)}>
@@ -98,6 +99,29 @@ export const UnifiedSendFormView: SnapComponent<UnifiedSendFormViewProps> = ({
9899
)}
99100
</Box>
100101
<Box>{null}</Box>
102+
<Box alignment="space-between" direction="horizontal">
103+
<SnapText fontWeight="medium" color="alternative">
104+
{t('toAddress')}
105+
</SnapText>
106+
{isValidSnapLinkProtocol(explorerUrl) ? (
107+
<Link href={displayExplorerUrl(explorerUrl, recipient)}>
108+
<Address
109+
address={displayCaip10(network, recipient)}
110+
truncate
111+
displayName
112+
avatar
113+
/>
114+
</Link>
115+
) : (
116+
<Address
117+
address={displayCaip10(network, recipient)}
118+
truncate
119+
displayName
120+
avatar
121+
/>
122+
)}
123+
</Box>
124+
<Box>{null}</Box>
101125
<Box alignment="space-between" direction="horizontal">
102126
<SnapText fontWeight="medium" color="alternative">
103127
{t('network')}

0 commit comments

Comments
 (0)