Skip to content
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 memo field to withdrawal transaction #4229

Merged
merged 5 commits into from May 19, 2020
Merged

Add memo field to withdrawal transaction #4229

merged 5 commits into from May 19, 2020

Conversation

ghost
Copy link

@ghost ghost commented May 3, 2020

  • "Memo" field is modeled as property of the new object Transaction which is stored in persitant storage.
  • Transaction object is modeled in a way that allows extension in the furure for more persisted attributes.

Will solve #1387


This is a Draft intended for early review because it is my first contribution during onboarding.

Preview:

image

@ghost ghost marked this pull request as draft May 3, 2020 02:18
@sqrrm
Copy link
Member

sqrrm commented May 8, 2020

I notice you have added a new storage class for transactions. There is already the bitcoinj Transaction which stores the transactions and has a memo field. What was the reasons for not using that? I suppose those transactions would be lost in an SPV resync. Just feels like quite a bit of extra work to store the memo field separately like this.

@ghost ghost changed the title [WIP] Add memo field to withdrawal transaction Add memo field to withdrawal transaction May 8, 2020
@ghost
Copy link
Author

ghost commented May 8, 2020

Thank you very much for direction. I have updated the code in this PR:

For now, I'll keep commits (to allow anyone to see the hisstory in this PR) but I will of course squash it before the merge.

@ghost ghost marked this pull request as ready for review May 8, 2020 19:48
Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

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

Tested it. The popup is not following dark mode scheme I think.
image

@@ -164,7 +163,8 @@ private WithdrawalView(BtcWalletService walletService,
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter,
Preferences preferences,
BtcAddressValidator btcAddressValidator,
WalletPasswordWindow walletPasswordWindow) {
WalletPasswordWindow walletPasswordWindow
) {
Copy link
Member

Choose a reason for hiding this comment

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

This is not customary. Not sure if it's in the style guide, but better keep it in line with other code and not line break before the parenthesis.

Copy link
Author

Choose a reason for hiding this comment

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

👍 this looks like some forgotten change after reverting my previous changes.

Maybe question/suggestion - is there any good automated style check (ideally with fixer) to solve issues like this to save some time? I am not really experienced in Java ecosystem, but I believe there is something like https://eslint.org/ but for Java.

Petr Hejna added 5 commits May 15, 2020 23:16
- "Memo" field is modeled as property of the new object Transaction which is stored in persitant storage.
- Transaction object is modeled in a way that allows extension in the furure for more persisted attributes.
@ghost
Copy link
Author

ghost commented May 15, 2020

@sqrrm About the dark mode tooltip. I am not sure if its a bug in my PR. As I understand it, I am using standard AutoTooltipLabel component. This component is used for other fields as well.

From this PR:
image

Am I missing something? If not, I suggest to create a special Issue for this as bug in the AutoTooltipLabel in DarkMode.

Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

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

utACK

I agree, the tooltip you use should be fixed as a separate issue.

@sqrrm sqrrm merged commit 8bffcd6 into bisq-network:master May 19, 2020
@ghost ghost deleted the 1387-add-memo-field branch May 21, 2020 10:37
@ghost ghost mentioned this pull request May 21, 2020
@ripcurlx ripcurlx added this to the v1.3.5 milestone Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants