Repository navigation
feat: add usdt wallet and paykit payments #1432
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
Merged
+17,388
−1,964
Merged
Changes from all commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
fdd47c6
feat: add usdt wallet and paykit payments
ben-kaufman b7a29d0
fix: preserve payment recovery and final authorization
ben-kaufman 3338d04
chore: rename changelog fragment
ben-kaufman 29c2413
feat: add usdt bridge support actions
ben-kaufman d7fe9c0
Make USDT sharing optional in companion authorization
ben-kaufman 7d9c8da
feat: apply usdt wallet designs
ben-kaufman d6937b2
fix: align paykit pricing with selected payment methods
ben-kaufman c2c7c89
fix: align USDT and Paykit screens with design updates
ben-kaufman 592b184
chore: update bitkit core to 0.8.0-rc2
ben-kaufman 0824171
fix: preserve multi-asset paykit pricing
ben-kaufman cc58f52
fix: align usdt displays with design feedback
ben-kaufman a032c9c
Preserve payment quotes during recovery and synchronize backups
ben-kaufman 35fa60e
fix: preserve quote deadlines through payment retries
ben-kaufman 51a8947
fix: use usdt colors for paid payment requests
ben-kaufman c5c25b1
fix: dismiss prepared requests when navigating back
ben-kaufman eeadd52
fix: route USDT payment links to send flow
ben-kaufman 81871b7
fix: show Lightning invoice fee estimates
ben-kaufman d9ecb5f
fix: clarify usdt payment status and fee failures
ben-kaufman 917fd95
chore: use the public usdt gateway
ben-kaufman 0b39e7d
fix: preserve payment review and contact state
ben-kaufman 0f88104
refactor: simplify hardware payment preparation
ben-kaufman 82b3e19
fix: preserve reviewed payment terms
ben-kaufman 4d4165d
docs: clarify unfunded Lightning receive journey
ben-kaufman 41959e7
fix: show completed deposit refunds accurately
ben-kaufman 50a61e4
feat: align USDT send and activity designs
ben-kaufman 3ecf2ac
docs: align USDT QA with current navigation
ben-kaufman a5e0bd4
fix: complete usdt design consistency
ben-kaufman 20e100b
fix(usdt): retain queued sends and align source-menu checks
ben-kaufman 0e7ad01
fix: expose send funding menu to UI automation
ben-kaufman 4b95d8f
fix: keep usdt send review and dismissal safe
ben-kaufman c9bfc7a
fix: preserve usdt payment links and clarify self sends
ben-kaufman 557e66f
fix: clarify bridge amount errors and incoming progress
ben-kaufman b5270f1
docs: clarify hardware manual entry journey
ben-kaufman 6c2e1d2
fix: clarify usdt review and navigation
ben-kaufman 82a1a9f
fix: distinguish sent and received bridge amounts
ben-kaufman adca467
fix: preserve usdt flows after rebase
ben-kaufman 056273b
Implement USDT opt-in and updated Figma sheets
ben-kaufman 3f3980c
fix: align USDT screens and payment recovery
ben-kaufman 15fe80d
fix: respect usdt opt-in across payment flows
ben-kaufman de1f9dc
test: cover initial usdt subscription payments
ben-kaufman e6d9511
feat: align payment requests and Earn with USDT designs
ben-kaufman 8657caf
Merge master security updates into USDT work
ben-kaufman 87be4ac
fix: keep Earn disclosures visible on compact screens
ben-kaufman 2de00fb
fix: align subscription totals and use core rc6
ben-kaufman a39ba35
fix: align earn introduction copy
ben-kaufman eac781d
fix: preserve usdt consent and payment navigation
ben-kaufman 9c7f570
fix: preserve active usdt payments when reading new addresses
ben-kaufman b014863
fix: preserve usdt send state across recreation
ben-kaufman 1ccb284
docs: clarify receive behavior after usdt restore
ben-kaufman c51f3bd
fix: preserve paykit review and recovery across assets
ben-kaufman b1fbfb8
fix: format usd request amounts for the device locale
ben-kaufman f2f766a
Match USDT bridge activity and refund designs
ben-kaufman d3acbb6
Align USDT bridge typography and spacing with designs
ben-kaufman 77545b8
docs: correct the documented core version
ben-kaufman 3f44eec
fix: match exact usdt activity searches
ben-kaufman 4f3ab97
fix: unblock usdt contact payments
ben-kaufman f5dc875
docs: align subscription acceptance journey
ben-kaufman 00a8e5d
fix: localize usdt refund amounts
ben-kaufman 7df6209
test: verify localized usdt refund flow
ben-kaufman af799d0
fix: preserve refund editing during refresh
ben-kaufman dcbf816
perf: reuse valid usdt payment quotes
ben-kaufman 423b74a
fix: prefer funded usdt for quoted requests
ben-kaufman 12dfd8a
fix: preserve usdt recovery and payment details
ben-kaufman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
app/src/androidTest/java/to/bitkit/ui/components/UsdtReceivePrivacyTest.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| package to.bitkit.ui.components | ||
|
|
||
| import android.content.Context | ||
| import androidx.activity.ComponentActivity | ||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.runtime.mutableStateOf | ||
| import androidx.compose.ui.platform.LocalContext | ||
| import androidx.compose.ui.test.assertIsDisplayed | ||
| import androidx.compose.ui.test.junit4.v2.createAndroidComposeRule | ||
| import androidx.compose.ui.test.onNodeWithTag | ||
| import androidx.compose.ui.test.onNodeWithText | ||
| import androidx.compose.ui.test.performClick | ||
| import dagger.hilt.android.testing.HiltAndroidRule | ||
| import dagger.hilt.android.testing.HiltAndroidTest | ||
| import org.junit.After | ||
| import org.junit.Before | ||
| import org.junit.Rule | ||
| import org.junit.Test | ||
| import to.bitkit.ext.getClipboardText | ||
| import to.bitkit.models.NewTransactionSheetDetails | ||
| import to.bitkit.models.NewTransactionSheetDirection | ||
| import to.bitkit.models.NewTransactionSheetType | ||
| import to.bitkit.test.annotations.ComposeUi | ||
| import to.bitkit.ui.screens.wallets.usdt.UsdtReceiveContent | ||
| import to.bitkit.ui.sheets.NewTransactionSheetView | ||
| import to.bitkit.ui.theme.AppThemeSurface | ||
| import java.util.Locale | ||
| import kotlin.test.assertEquals | ||
|
|
||
| @HiltAndroidTest | ||
| @ComposeUi | ||
| class UsdtReceivePrivacyTest { | ||
| private val originalLocale = Locale.getDefault() | ||
|
|
||
| @get:Rule | ||
| val hiltRule = HiltAndroidRule(this) | ||
|
|
||
| @get:Rule | ||
| val composeTestRule = createAndroidComposeRule<ComponentActivity>() | ||
|
|
||
| @Before | ||
| fun setup() { | ||
| Locale.setDefault(Locale.US) | ||
| hiltRule.inject() | ||
| } | ||
|
|
||
| @After | ||
| fun teardown() { | ||
| Locale.setDefault(originalLocale) | ||
| } | ||
|
|
||
| @Test | ||
| fun qrCopyPreservesPaymentUriAndDetailsCopyOnlyAddress() { | ||
| val address = "0x18503bD685aF84E6A7bC289898bAa1C3f5d8527E" | ||
| val uri = "ethereum:0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9@42161/transfer?address=$address&uint256=3500000" | ||
| lateinit var context: Context | ||
| composeTestRule.setContent { | ||
| context = LocalContext.current | ||
| AppThemeSurface { | ||
| Column { | ||
| UsdtReceiveContent(address, uri, null, "Arbitrum One", {}, {}) | ||
| } | ||
| } | ||
| } | ||
| composeTestRule.onNodeWithTag("ReceiveCopyQR").performClick() | ||
| composeTestRule.runOnIdle { assertEquals(uri, context.getClipboardText()) } | ||
| composeTestRule.onNodeWithTag("UsdtReceiveDetails").performClick() | ||
| composeTestRule.onNodeWithText("Copy").performClick() | ||
| composeTestRule.runOnIdle { assertEquals(address, context.getClipboardText()) } | ||
| composeTestRule.runOnIdle { composeTestRule.activity.onBackPressedDispatcher.onBackPressed() } | ||
| composeTestRule.onNodeWithTag("ReceiveCopyQR").assertIsDisplayed() | ||
| } | ||
|
|
||
| @Test | ||
| fun incomingPaymentHonorsHiddenBalance() { | ||
| composeTestRule.mainClock.autoAdvance = false | ||
| val hidden = mutableStateOf(true) | ||
| composeTestRule.setContent { | ||
| AppThemeSurface { | ||
| NewTransactionSheetView( | ||
| details = NewTransactionSheetDetails( | ||
| type = NewTransactionSheetType.ONCHAIN, | ||
| direction = NewTransactionSheetDirection.RECEIVED, | ||
| usdtAmount = 123_456_789uL, | ||
| ), | ||
| onCloseClick = {}, | ||
| onDetailClick = {}, | ||
| hideBalance = hidden.value, | ||
| ) | ||
| } | ||
| } | ||
| composeTestRule.mainClock.advanceTimeBy(1000) | ||
| composeTestRule.onNodeWithText("123.46").assertDoesNotExist() | ||
| composeTestRule.runOnIdle { hidden.value = false } | ||
| composeTestRule.mainClock.advanceTimeByFrame() | ||
| composeTestRule.onNodeWithText("123.46").assertIsDisplayed() | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.