Skip to content

Commit

Permalink
Remaining fixes before relase
Browse files Browse the repository at this point in the history
  • Loading branch information
langerhans committed Feb 6, 2021
1 parent f41f833 commit cf0c4cc
Show file tree
Hide file tree
Showing 18 changed files with 242 additions and 17 deletions.
202 changes: 201 additions & 1 deletion wallet/assets-prod/checkpoints.txt

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions wallet/assets-prod/fees.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# fee rates in satoshis per 1000 bytes of tx data
ECONOMIC=10000
NORMAL=40000
PRIORITY=200000
ECONOMIC=100000000
NORMAL=100000000
PRIORITY=100000000
6 changes: 3 additions & 3 deletions wallet/assets/fees.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# fee rates in satoshis per 1000 bytes of tx data
ECONOMIC=5000
NORMAL=10000
PRIORITY=50000
ECONOMIC=100000000
NORMAL=100000000
PRIORITY=100000000
Binary file modified wallet/res-prod/drawable-xhdpi/widget_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions wallet/res-prod/xml/shortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<intent
android:action="android.intent.action.VIEW"
android:targetClass="de.schildbach.wallet.ui.SendCoinsQrActivity"
android:targetPackage="de.schildbach.wallet" />
android:targetPackage="de.langerhans.wallet" />
</shortcut>
<shortcut
android:icon="@drawable/shortcut_send_coins"
Expand All @@ -20,7 +20,7 @@
<intent
android:action="android.intent.action.VIEW"
android:targetClass="de.schildbach.wallet.ui.send.SendCoinsActivity"
android:targetPackage="de.schildbach.wallet" />
android:targetPackage="de.langerhans.wallet" />
</shortcut>
<shortcut
android:icon="@drawable/shortcut_request_coins"
Expand All @@ -29,6 +29,6 @@
<intent
android:action="android.intent.action.VIEW"
android:targetClass="de.schildbach.wallet.ui.RequestCoinsActivity"
android:targetPackage="de.schildbach.wallet" />
android:targetPackage="de.langerhans.wallet" />
</shortcut>
</shortcuts>
Binary file added wallet/res/mipmap-hdpi/ic_pink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wallet/res/mipmap-mdpi/ic_pink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wallet/res/mipmap-xhdpi/ic_pink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wallet/res/mipmap-xxhdpi/ic_pink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wallet/res/mipmap-xxxhdpi/ic_pink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions wallet/res/xml/preference_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
android:key="about_version"
android:title="@string/about_version_title" />
<Preference
android:key="about_copyright"
android:summary="© 2011-2020, the Bitcoin Wallet developers\n© 2013-2020, the Dogecoin Wallet developers"
android:title="@string/about_copyright_title" />
<Preference
Expand Down
6 changes: 3 additions & 3 deletions wallet/res/xml/shortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<intent
android:action="android.intent.action.VIEW"
android:targetClass="de.schildbach.wallet.ui.SendCoinsQrActivity"
android:targetPackage="de.schildbach.wallet_test" />
android:targetPackage="de.langerhans.wallet_test" />
</shortcut>
<shortcut
android:icon="@drawable/shortcut_send_coins"
Expand All @@ -20,7 +20,7 @@
<intent
android:action="android.intent.action.VIEW"
android:targetClass="de.schildbach.wallet.ui.send.SendCoinsActivity"
android:targetPackage="de.schildbach.wallet_test" />
android:targetPackage="de.langerhans.wallet_test" />
</shortcut>
<shortcut
android:icon="@drawable/shortcut_request_coins"
Expand All @@ -29,6 +29,6 @@
<intent
android:action="android.intent.action.VIEW"
android:targetClass="de.schildbach.wallet.ui.RequestCoinsActivity"
android:targetPackage="de.schildbach.wallet_test" />
android:targetPackage="de.langerhans.wallet_test" />
</shortcut>
</shortcuts>
3 changes: 2 additions & 1 deletion wallet/src/de/schildbach/wallet/data/DynamicFeeLiveData.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ protected void onActive() {
private Map<FeeCategory, Coin> loadInBackground() {
try {
final Map<FeeCategory, Coin> staticFees = parseFees(assets.open(Constants.Files.FEES_ASSET));
fetchDynamicFees(dynamicFeesUrl, tempFile, dynamicFeesFile, userAgent);
// DOGE: never fetch dynamic fees from remote
//fetchDynamicFees(dynamicFeesUrl, tempFile, dynamicFeesFile, userAgent);
if (!dynamicFeesFile.exists())
return staticFees;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ protected Peer selectDownloadPeer(List<Peer> peers) {
if (!versionMessage.hasBlockChain())
continue;
final long peerHeight = peer.getBestHeight();
if (peerHeight < mostCommonChainHeight || peerHeight > mostCommonChainHeight + 1)
if (peer.getPeerBlockHeightDifference() < 0)
continue;
//if (peerHeight < mostCommonChainHeight || peerHeight > mostCommonChainHeight + 1)
// continue;
candidates.add(peer);
}
if (candidates.isEmpty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public void onBindViewHolder(final ViewHolder holder, final int position, final
}
if (fullBind || changes.contains(ChangeType.RATE)) {
holder.rateView.setFormat(Constants.LOCAL_FORMAT.postfixCode().code(0, "/1k"));
holder.rateView.setAmount(listItem.baseRateAsFiat.divide(10));
holder.rateView.setAmount(listItem.baseRateAsFiat.multiply(1000));
holder.walletView.setFormat(Constants.LOCAL_FORMAT);
if (listItem.balanceAsFiat != null) {
holder.walletView.setAmount(listItem.balanceAsFiat);
Expand Down
18 changes: 18 additions & 0 deletions wallet/src/de/schildbach/wallet/ui/preference/AboutFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.widget.ImageView;
import android.widget.Toast;

import androidx.annotation.Nullable;
import de.schildbach.wallet.R;
import de.schildbach.wallet.WalletApplication;
Expand Down Expand Up @@ -72,6 +75,8 @@ public void onAttach(final Activity activity) {
this.packageManager = activity.getPackageManager();
}

private int counter = 0;

@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand All @@ -85,6 +90,19 @@ public void onCreate(final Bundle savedInstanceState) {
new ApkHashFragment().show(getFragmentManager(), null);
return true;
});
findPreference("about_copyright").setOnPreferenceClickListener(pref -> {
counter++;
if (counter >= 7) {
Toast toast = new Toast(getContext());
ImageView view = new ImageView(getContext());
view.setImageResource(R.mipmap.ic_pink);
toast.setView(view);
toast.setDuration(Toast.LENGTH_SHORT);
toast.show();
counter = 0;
}
return true;
});

Installer installer = Installer.from(application);
if (installer == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ public void onPrepareOptionsMenu(final Menu menu) {
&& viewModel.paymentIntent.mayEditAmount() && viewModel.balance.getValue() != null);

final MenuItem feeCategoryAction = menu.findItem(R.id.send_coins_options_fee_category);
feeCategoryAction.setVisible(false); //DOGE: We only have static fees
feeCategoryAction.setEnabled(viewModel.state == SendCoinsViewModel.State.INPUT);
if (viewModel.feeCategory == FeeCategory.ECONOMIC)
menu.findItem(R.id.send_coins_options_fee_category_economic).setChecked(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public static void start(final Context context) {

public static void start(final Context context, final PrefixedChecksummedBytes key) {
final Intent intent = new Intent(context, SweepWalletActivity.class);
intent.putExtra(INTENT_EXTRA_KEY, key);
// This crashes. For reasons.
// Jokes aside though this is cause PrefixedChecksummedBytes fails to deserialize properly for altcoins.
//intent.putExtra(INTENT_EXTRA_KEY, key);
context.startActivity(intent);
}

Expand Down

0 comments on commit cf0c4cc

Please sign in to comment.