Skip to content

Commit

Permalink
Skip onramp account selection/copying for Concordex (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaiatsartem authored Nov 7, 2024
1 parent 9731b2d commit 0f0691e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@

- Showing incorrect commission rates on the update validator stake update confirmation screen

### Changed

- When going to Concordex DEX, there's no need to select or copy account address,
as it is a WalletConnect-based DEX which fetches the wallet data itself.

## [1.3.0] - 2024-10-18

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,38 @@ class CcdOnrampSitesActivity : BaseActivity(
private fun onSiteClicked(site: CcdOnrampSite) {
val accountAddress = viewModel.accountAddress

if (accountAddress != null) {
if (site.type == CcdOnrampSite.Type.DEX) {
OpenCcdOnrampSiteWithAccountUseCase(
site = site,
accountAddress = accountAddress,
onAccountAddressCopied = {
Toast
.makeText(
this,
getString(R.string.template_ccd_onramp_opening_site, site.name),
Toast.LENGTH_SHORT
)
.show()
},
accountAddress = "",
onAccountAddressCopied = { },
context = this,
).invoke()
} else {
val intent = Intent(this, CcdOnrampAccountsActivity::class.java)
intent.putExtras(
CcdOnrampAccountsActivity.getBundle(
if (accountAddress != null) {
OpenCcdOnrampSiteWithAccountUseCase(
site = site,
accountAddress = accountAddress,
onAccountAddressCopied = {
Toast
.makeText(
this,
getString(R.string.template_ccd_onramp_opening_site, site.name),
Toast.LENGTH_SHORT
)
.show()
},
context = this,
).invoke()
} else {
val intent = Intent(this, CcdOnrampAccountsActivity::class.java)
intent.putExtras(
CcdOnrampAccountsActivity.getBundle(
site = site,
)
)
)
startActivity(intent)
startActivity(intent)
}
}
}

Expand Down

0 comments on commit 0f0691e

Please sign in to comment.