Skip to content

Commit

Permalink
Fix some last minute bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
langerhans committed Dec 8, 2015
1 parent c7ea7bc commit bdfb3ec
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions wallet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ android {

defaultConfig {
applicationId 'de.langerhans.wallet'
versionCode 204
versionName '2.0.4'
versionCode 206
versionName '2.0.6'
minSdkVersion 15
targetSdkVersion 22
}
Expand Down
2 changes: 1 addition & 1 deletion wallet/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<string name="wallet_transactions_fragment_empty_text_received">No Bitcoins received so far.</string>
<string name="wallet_transactions_fragment_empty_text_sent">No Bitcoins sent so far.</string>
<string name="wallet_transactions_fragment_empty_text_howto">How to get Bitcoins?\n\nTrade for traditional money,\nsell goods or services or\nearn by working.</string>
<string name="wallet_transactions_fragment_empty_text_warning">Verwende dieses Wallet nicht für viele Transaktionen mit vielen Ausgängen, wie bspw. Mining Pool oder Faucet Auszahlungen. Sie können das Wallet bis zum Halt verlangsamen.</string>
<string name="wallet_transactions_fragment_empty_text_warning">Do not use this wallet to receive lots of transactions with many outputs, like mining pool or faucet payouts! They tend to slow down the wallet to a halt.</string>
<string name="wallet_transactions_row_warning_backup">Congratulations, you received your first payment! Have you already &lt;u&gt;backed up your wallet&lt;/u&gt;, to protect against loss?</string>
<string name="wallet_transactions_row_warning_storage_encryption">Hint: to increase the safety of your wallet, you can &lt;u&gt;encrypt your device&lt;/u&gt;. This also protects data of other apps.</string>
<string name="wallet_transactions_fragment_coinbase">mined</string>
Expand Down
3 changes: 3 additions & 0 deletions wallet/src/de/schildbach/wallet/WalletApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.bitcoinj.core.Wallet;
import org.bitcoinj.crypto.LinuxSecureRandom;
import org.bitcoinj.crypto.MnemonicCode;
import org.bitcoinj.params.Networks;
import org.bitcoinj.store.UnreadableWalletException;
import org.bitcoinj.store.WalletProtobufSerializer;
import org.bitcoinj.utils.Threading;
Expand Down Expand Up @@ -103,6 +104,8 @@ public void onCreate()

log.info("=== starting app using configuration: {}, {}", Constants.TEST ? "test" : "prod", Constants.NETWORK_PARAMETERS.getId());

Networks.register(Constants.NETWORK_PARAMETERS);

super.onCreate();

packageInfo = packageInfoFromContext(this);
Expand Down
4 changes: 2 additions & 2 deletions wallet/src/de/schildbach/wallet/ui/RequestCoinsFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public boolean onOptionsItemSelected(final MenuItem item)
private void handleCopy()
{
final Uri request = Uri.parse(determineBitcoinRequestStr(false));
clipboardManager.setPrimaryClip(ClipData.newRawUri("Bitcoin payment request", request));
clipboardManager.setPrimaryClip(ClipData.newRawUri("Dogecoin payment request", request));
log.info("payment request copied to clipboard: {}", request);
new Toast(activity).toast(R.string.request_coins_clipboard_msg);
}
Expand Down Expand Up @@ -461,7 +461,7 @@ private String determineBitcoinRequestStr(final boolean includeBluetoothMac)
uri.append(amount == null && ownName == null ? '?' : '&');
uri.append(Bluetooth.MAC_URI_PARAM).append('=').append(bluetoothMac);
}
return uri.toString();
return uri.toString().replace(BitcoinURI.BITCOIN_SCHEME, "dogecoin");
}

private byte[] determinePaymentRequest(final boolean includeBluetoothMac)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,14 @@ private void handleRemove(final String address)

private void handleShowQr(final String address, final String label)
{
final String uri = BitcoinURI.convertToBitcoinURI(address, null, label, null);
final String uri = BitcoinURI.convertToBitcoinURI(address, null, label, null).replace(BitcoinURI.BITCOIN_SCHEME, "dogecoin");
final int size = getResources().getDimensionPixelSize(R.dimen.bitmap_dialog_qr_size);
BitmapFragment.show(getFragmentManager(), Qr.bitmap(uri, size));
}

private void handleCopyToClipboard(final String address)
{
clipboardManager.setPrimaryClip(ClipData.newPlainText("Bitcoin address", address));
clipboardManager.setPrimaryClip(ClipData.newPlainText("Dogecoin address", address));
log.info("address copied to clipboard: {}", address.toString());
new Toast(activity).toast(R.string.wallet_address_fragment_clipboard_msg);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public void onLoadFinished(final Loader<Address> loader, final Address currentAd
{
currentAddressQrAddress = new AddressAndLabel(currentAddress, config.getOwnName());

final String addressStr = BitcoinURI.convertToBitcoinURI(currentAddressQrAddress.address, null, currentAddressQrAddress.label, null);
final String addressStr = BitcoinURI.convertToBitcoinURI(currentAddressQrAddress.address, null, currentAddressQrAddress.label, null).replace(BitcoinURI.BITCOIN_SCHEME, "dogecoin");

final int size = getResources().getDimensionPixelSize(R.dimen.bitmap_dialog_qr_size);
currentAddressQrBitmap = Qr.bitmap(addressStr, size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private void handleEdit(final Address address)

private void handleShowQr(final Address address)
{
final String uri = BitcoinURI.convertToBitcoinURI(address, null, config.getOwnName(), null);
final String uri = BitcoinURI.convertToBitcoinURI(address, null, config.getOwnName(), null).replace(BitcoinURI.BITCOIN_SCHEME, "dogecoin");
final int size = getResources().getDimensionPixelSize(R.dimen.bitmap_dialog_qr_size);
BitmapFragment.show(getFragmentManager(), Qr.bitmap(uri, size));
}
Expand Down

0 comments on commit bdfb3ec

Please sign in to comment.