-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add on-chain withdraw UI #69
base: master
Are you sure you want to change the base?
Conversation
client/src/model.js
Outdated
@@ -68,6 +69,7 @@ module.exports = ({ dismiss$, togExp$, togTheme$, togUnit$, page$, goHome$, goRe | |||
, outgoing$.map(p => [ 'success', `Sent payment of @{{${p.msatoshi}}}` ]) | |||
, funded$.map(c => [ 'success', `Opening channel for @{{${c.chan.msatoshi_total}}}, awaiting on-chain confirmation` ]) | |||
, closed$.map(c => [ 'success', `Channel ${c.chan.short_channel_id || c.chan.channel_id} is closing` ]) | |||
, withdrawn$.map(w => [ 'success', `Withdraw completed. t word-wrap: break-word;word-wrap: break-word; xid: ${w.txid}` ]) |
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.
Looks like something slipped in here?
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.
"Completed" could imply "confirmed", which isn't true at this point. How about "sent" instead "completed"?
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.
Both fixed
client/src/views/index.js
Outdated
@@ -5,6 +5,7 @@ module.exports = { | |||
, ...require('./recv') | |||
, ...require('./node') | |||
, ...require('./channels') | |||
, ...require('./onchain') | |||
, ...require('./deposit') | |||
, ...require('./withdraw') |
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.
Maybe have both views under onchain.js
?
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.
done
client/src/intent.js
Outdated
// Withdraw | ||
, execWithdraw$ = submit('[do=exec-withdraw]') | ||
.map(d => ({ ...d, amount_sat: toSatCapacity(d.amount_sat) })) | ||
, withdrawAll$ = on('[name=withdraw-all]', 'input') |
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.
Perhaps fundMaxChan$
and withdrawAll$
could be unified to a single stream of fundMax$
, used both in the channel creation and withdraw pages?
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.
Is there a better way?
spark-wallet/client/src/intent.js
Line 78 in b7d9f70
, fundMax$ = O.merge( |
client/src/rpc.js
Outdated
@@ -30,6 +30,7 @@ exports.parseRes = ({ HTTP, SSE }) => { | |||
, invoice$: reply('invoice').map(r => ({ ...r.body, ...r.request.ctx })) | |||
, outgoing$: reply('pay').map(r => ({ ...r.body, ...r.request.ctx })) | |||
, newaddr$: reply('newaddr').map(r => ({ address: r.body.address, type: r.request.send.params[0] })) | |||
, withdrawn$: reply('withdraw').map(r => ({tx: r.body.tx, txid: r.body.txid})) |
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 don't have use for the full tx
, we can keep just the txid
.
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.
done
48176a7
to
f1a684f
Compare
No description provided.