Skip to content

Commit

Permalink
Merge pull request #452 from cosmostation/feature/APP-641_v1.7.8-test
Browse files Browse the repository at this point in the history
[APP-641] Mnemonic add dialog cancel button position change
  • Loading branch information
Kwonhyukjoon authored Dec 6, 2022
2 parents 0a36bfa + f156404 commit f117c3a
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,7 @@ public void onCheckStartRepayCdp() {

private boolean onCommonCheck() {
if (!mAccount.hasPrivateKey) {
CommonAlertDialog.showDoubleButton(this, getString(R.string.str_only_observe_title), getString(R.string.str_only_observe_msg),
getString(R.string.str_close), null, getString(R.string.str_add_mnemonics), view -> onAddMnemonicForAccount());
onInsertKeyDialog();
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ public void onHardRepay() {

private boolean onCommonCheck() {
if (!mAccount.hasPrivateKey) {
CommonAlertDialog.showDoubleButton(this, getString(R.string.str_only_observe_title), getString(R.string.str_only_observe_msg),
getString(R.string.str_close), null, getString(R.string.str_add_mnemonics), view -> onAddMnemonicForAccount());
onInsertKeyDialog();
return false;
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ protected void onCreate(Bundle savedInstanceState) {
mBtnCreateNft.setOnClickListener(v -> {
if (mAccount == null) return;
if (!mAccount.hasPrivateKey) {
CommonAlertDialog.showDoubleButton(NFTListActivity.this, getString(R.string.str_only_observe_title), getString(R.string.str_only_observe_msg),
Html.fromHtml("<font color=\"#9C6CFF\">" + getString(R.string.str_add_mnemonics) + "</font>", Html.FROM_HTML_MODE_COMPACT), view -> onAddMnemonicForAccount(), getString(R.string.str_close), null);
onInsertKeyDialog();
return;
}
if (!WDp.isTxFeePayable(NFTListActivity.this, getBaseDao(), mChainConfig)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,7 @@ else if (result.taskType == TASK_GRPC_FETCH_NODE_INFO) {
getBaseDao().mGrpcStarNameConfig = ((starnamed.x.configuration.v1beta1.Types.Config) result.resultData);
}

}

else if (result.taskType == TASK_FETCH_KAVA_INCENTIVE_REWARD) {
} else if (result.taskType == TASK_FETCH_KAVA_INCENTIVE_REWARD) {
if (result.isSuccess && result.resultData != null) {
getBaseDao().mIncentiveRewards = (IncentiveReward) result.resultData;
}
Expand Down Expand Up @@ -941,7 +939,7 @@ else if (result.taskType == TASK_FETCH_MINTSCAN_CW20_ASSETS) {

public void onShowBuyWarnNoKey() {
CommonAlertDialog.showDoubleButton(this, getString(R.string.str_only_observe_title), getString(R.string.str_buy_without_key_msg),
getString(R.string.str_cancel), null, getString(R.string.str_continue), view -> onShowCryptoPay());
getString(R.string.str_continue), view -> onShowCryptoPay(), getString(R.string.str_cancel), null);
}

public void onShowCryptoPay() {
Expand All @@ -960,7 +958,7 @@ public void onShowCryptoPay() {

public void onShowBuyKado() {
String query = "?apiKey=" + getString(R.string.kado_money_public_key) + "&network=" + mChainConfig.chainName() + "&networkList=" + mChainConfig.chainName() + "&onToAddress=" + mAccount.address;
if(mChainConfig.baseChain().equals(INJ_MAIN)) {
if (mChainConfig.baseChain().equals(INJ_MAIN)) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.url_kado_money) + query + "&onRevCurrency=" + "USDT"));
startActivity(intent);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ public void onBindHolder(@NotNull MainActivity mainActivity) {

mBtnWalletConnect.setOnClickListener(v -> {
if (!mainActivity.mAccount.hasPrivateKey) {
CommonAlertDialog.showDoubleButton(mainActivity, mainActivity.getString(R.string.str_only_observe_title), mainActivity.getString(R.string.str_only_observe_msg),
mainActivity.getString(R.string.str_close), null,
Html.fromHtml("<font color=\"#9C6CFF\">" + mainActivity.getString(R.string.str_add_mnemonics) + "</font>", Html.FROM_HTML_MODE_COMPACT), view -> mainActivity.onAddMnemonicForAccount());
mainActivity.onInsertKeyDialog();
return;
}
new TedPermission(mainActivity).setPermissionListener(new PermissionListener() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ public void onBindHolder(@NotNull MainActivity mainActivity) {
}
mBtnWalletConnect.setOnClickListener(v -> {
if (!mainActivity.mAccount.hasPrivateKey) {
CommonAlertDialog.showDoubleButton(mainActivity, mainActivity.getString(R.string.str_only_observe_title), mainActivity.getString(R.string.str_only_observe_msg),
mainActivity.getString(R.string.str_close), null,
Html.fromHtml("<font color=\"#9C6CFF\">" + mainActivity.getString(R.string.str_add_mnemonics) + "</font>", Html.FROM_HTML_MODE_COMPACT), view -> mainActivity.onAddMnemonicForAccount());
mainActivity.onInsertKeyDialog();
return;
} else {
new TedPermission(mainActivity).setPermissionListener(new PermissionListener() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ public void onBindHolder(@NotNull MainActivity mainActivity) {
if (mainActivity.getBaseDao().mTopValidators == null && mainActivity.getBaseDao().mTopValidators.size() == 0)
return;
if (!mainActivity.mAccount.hasPrivateKey) {
CommonAlertDialog.showDoubleButton(mainActivity, mainActivity.getString(R.string.str_only_observe_title), mainActivity.getString(R.string.str_only_observe_msg),
mainActivity.getString(R.string.str_close), null,
Html.fromHtml("<font color=\"#9C6CFF\">" + mainActivity.getString(R.string.str_add_mnemonics) + "</font>", Html.FROM_HTML_MODE_COMPACT), view -> mainActivity.onAddMnemonicForAccount());
mainActivity.onInsertKeyDialog();
return;
}

Expand All @@ -91,8 +89,7 @@ public void onBindHolder(@NotNull MainActivity mainActivity) {
if (mainActivity.getBaseDao().mTopValidators == null && mainActivity.getBaseDao().mTopValidators.size() == 0)
return;
if (!mainActivity.mAccount.hasPrivateKey) {
CommonAlertDialog.showDoubleButton(mainActivity, mainActivity.getString(R.string.str_only_observe_title), mainActivity.getString(R.string.str_only_observe_msg),
mainActivity.getString(R.string.str_close), null, Html.fromHtml("<font color=\"#9C6CFF\">" + mainActivity.getString(R.string.str_add_mnemonics) + "</font>", Html.FROM_HTML_MODE_COMPACT), view -> mainActivity.onAddMnemonicForAccount());
mainActivity.onInsertKeyDialog();
return;
}

Expand Down

0 comments on commit f117c3a

Please sign in to comment.