-
Notifications
You must be signed in to change notification settings - Fork 308
add bitcoin receiving address to profile #1437
Conversation
@reedlaw This is a great first pull request, thanks! :D The one thing we need here that isn't obvious or documented (yet! coming soon) is that we want to log changes to the columns in the participants table. The way we're doing that is with a rule that in this case would log to a Also, #gittip on Freenode is a great place to connect if you're comfortable with IRC and want to chat about this. |
@@ -37,6 +37,7 @@ CREATE TABLE participants | |||
-- stored here as an optimization and sanity check. | |||
, balance numeric(35,2) DEFAULT 0.0 | |||
, pending numeric(35,2) DEFAULT NULL | |||
, bitcoin_address text DEFAULT NULL |
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.
Can't blame you because we haven't documented it yet (#1272), but schema changes need to go in a branch.sql
file. schema.sql
is append-only. Also, we need a rule that logs changes to participants.bitcoin_address
into a bitcoin_addresses
table. See schema.sql
for examples.
I wasn't sure what the |
@reedlaw I'm debating whether to ask you for tests on this. :-) We don't have client-side tests in place yet, but there are tests for other json endpoints that you should be able to use as a starting point for testing |
@reedlaw Copy/paste the code you added to |
Can we get this in a key in |
@whit537 I figured I'd voice it now since it isn't a huge thing :P If it isn't added here, I'll volunteer to add it later :) |
Ok, I think I've addressed all the issues in my latest commit. Please have a look. |
I've tested this in the UI and I can save this example address:
I've asked @reedlaw in IRC to implement the UI as inline ajax based on the example in #1287 rather than as a separate page (as with the credit card and bank pages). We also need to make sure that we have Unix line-endings ( The tests are failing for me. I get 11 errors out (out of 285 tests) with |
I fixed the failing test. It was due to adding Now all the tests are passing and the bitcoin address field is inline on the profile page. |
Ah, good catch, sorry. Looks like it's the only one:
I've updated it on master. |
Steps
Expected: New tab opens, profile tab stays unchanged. Actual: New tab opens, bitcoin address is apparently editable on profile tab(!). |
@whit537 good catch! It was a javascript bug that I've now fixed. It didn't actually allow anyone to edit another user's bitcoin address. If you crafted the HTML to submit the form it would still only edit your own user's bitcoin address. |
steps
expected: profile page stays the same, and I am sent to a blockchain.info page actual: profile page switches to "edit" mode for bitcoin address, and then I am sent to a blockchain.info page |
@reedlaw How are we doin' here? Can we fix that last bug so we can land this? P.S. Would be good to sync master out to your branch since it's moved a bit. Let's bring this in for a landing! |
Still settling after a move. Hope I get a chance soon... On Thu, Oct 3, 2013 at 4:06 PM, Chad Whitacre [email protected]:
Reed Law |
Thanks for the pingback, @reedlaw. Keep us posted. :-) |
Let me know if that last commit works for you. |
Hey @reedlaw! Could you please
steps
expected: actual: See for example the |
@whit537 I don't know. I'd first merge master and start fixing after that. It might be something spurious. |
What are we doing now with this pull request? |
It's pretty good, but we lost @reedlaw. Ideally we'd dust it off and land it. It's not too complicated and not too far from done. |
@whit537 I'm sorry, I started this when I had a big chunk of time but since getting back to work I haven't had time to pursue it. I may have time in a month or so, or feel free to let someone take over and finish this. |
@reedlaw No worries, thanks for checking in. Sorry I try harder to land this three months ago. :-/ |
!m @galuszkak |
hey @zwn seems that test are passing now after merge without any problems... I will create pull request with merge. |
This introduces bitcoin address field in gittip profile
Moving over to #1814 |
For issue #1164