Skip to content

[NMA-1032] (CrowdNode) Withdraw - #918

Merged
HashEngineering merged 16 commits into
feature-crowdnode-integrationfrom
feature-crowdnode-withdraw
Mar 23, 2022
Merged

[NMA-1032] (CrowdNode) Withdraw#918
HashEngineering merged 16 commits into
feature-crowdnode-integrationfrom
feature-crowdnode-withdraw

Conversation

@Syn-McJ

@Syn-McJ Syn-McJ commented Mar 19, 2022

Copy link
Copy Markdown
Member

We want an ability to withdraw DASH from CrowdNode.

Issue being fixed or feature implemented

Related PR's and Dependencies

Screenshots / Videos

How Has This Been Tested?

  • QA (Mobile Team)

Checklist:

  • I have performed a self-review of my own code and added comments where necessary
  • I have added or updated relevant unit/integration/functional/e2e tests

@Syn-McJ
Syn-McJ requested a review from HashEngineering March 19, 2022 08:55
@Syn-McJ Syn-McJ self-assigned this Mar 19, 2022
Comment on lines +213 to +214
val maxPermil = ApiCode.WithdrawAll.code
val requestPermil = min(amount.value * maxPermil / balance.value, maxPermil)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is "mil" 1000th or 0.1%?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

One per mil is 1/1000 or 0.1%: https://en.wikipedia.org/wiki/Per_mille

Comment on lines +20 to +29
enum class ApiCode(val code: Long, val isRequest: Boolean = false) {
PleaseAcceptTerms(2, true),
WelcomeToApi(4, true),
DepositReceived(8, true),
WithdrawalQueue(16, true),
WithdrawAll(1000, false),
SignUp(131072, false),
AcceptTerms(65536, false),
MaxCode(131072, false)
} No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

good to see all these constants in one place.

Comment on lines +55 to +57
private fun isPowerOfTwo(number: Long): Boolean {
return number and number - 1 == 0L
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a very cool formula.

Comment on lines -68 to +69
<string name="send_coins_fragment_hint_dusty_send">จำนวนเงินน้อยเกินไปที่จะส่ง</string>
<string name="send_coins_fragment_hint_insufficient_money">ยอดเงินไม่เพียงพอ</string>
<string name="send_coins_error_dusty_send">จำนวนเงินน้อยเกินไปที่จะส่ง</string>
<string name="send_coins_error_insufficient_money">ยอดเงินไม่เพียงพอ</string>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Luckily the memory function of Transifex will handle this change.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Though I see that these strings are actually moved to common -- which is also fine. The translation update after this will also move all other languages for these strings to common.

@HashEngineering HashEngineering left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

great. some comments left, but no changes are required.

@HashEngineering
HashEngineering merged commit 2b52c25 into feature-crowdnode-integration Mar 23, 2022
@Syn-McJ
Syn-McJ deleted the feature-crowdnode-withdraw branch April 26, 2022 05:20
bfoss765 added a commit that referenced this pull request Aug 11, 2026
…oled surface

dash-sdk-android 0.1.0-v41int18 -> v41int19 (platform#4329 pooled funding on
rust-dashcore 8f26456b: ALL_SPENDABLE account type through Rust/FFI/JNI/Kotlin,
sendToAddresses/buildSignedPayment defaults flipped; carries #931 dedup, #915,
#925 add_funding, #929 contact-account funding, #918 AddressState).

CoreSendAllNative migrates off the v1 split surface (#4323 deprecated
setFunding$sdk_release/buildSigned$sdk_release — the split is not
concurrency-safe): the drain now runs new -> addOutput ->
setSelectionStrategy(ALL) -> finalizeAtomic$sdk_release (atomic
select+reserve+sign under the wallet-manager lock) -> ManagedCoreWallet
.broadcastTransaction(FinalizedCoreTransaction).

The user-facing send-all now drains the pooled ALL_SPENDABLE set (BIP44 +
BIP32 + every DashPay receival account in ONE transaction); the CoinJoin
drain stays pinned to the COIN_JOIN account — de-mixing remains a separate,
explicit flow.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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