Skip to content
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

New master release #151

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ dependencies {
compile 'net.sf.scuba:scuba-sc-android:0.0.9'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'com.androidadvance:topsnackbar:1.1.1'
compile 'com.github.rahatarmanahmed:circularprogressview:2.5.0'

// Logging dependencies for bitcoinj
compile group: 'org.slf4j', name:'slf4j-api', version: '1.7.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void atElectionActivity() throws Exception {
onView(withId(R.id.app_bar)).check(new ViewAssertion() {
@Override
public void check(View view, NoMatchingViewException noViewFoundException) {
assertEquals(((Toolbar) view).getTitle(), "Choose election");
assertEquals(((Toolbar) view).getTitle(), electionActivity.getString(R.string.election_choice));
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@
import java.util.Map;

public class BlockChain {
public static final String PEER_IP = "188.226.149.56";
public static final String PEER_IP = "188.166.14.201";
private static BlockChain instance;
private WalletAppKit kit;
private Context context;
private ProgressTracker progressTracker;

private InetAddress peeraddr;
private long addressChecksum = 0xcc350cafL;
private String[] version = {"00", "62", "8f", "ed"};
private long addressChecksum = 0xb6b31b44L;
private String[] version = {"00", "69", "fc", "95"};
final NetworkParameters params = MultiChainParams.get(
"00d7fa1a62c5f1eadd434b9f7a8a657a42bd895f160511af6de2d2cd690319b8",
"01000000000000000000000000000000000000000000000000000000000000000000000059c075b5dd26a328e185333ce1464b7279d476fbe901c38a003e694906e01c073b633559ffff0020ae0000000101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff1704ffff002001040f4d756c7469436861696e20766f7465ffffffff0200000000000000002f76a91474f585ec0e5f452a80af1e059b9d5079ec501d5588ac1473706b703731000000000000ffffffff3b633559750000000000000000131073706b6e0200040101000104726f6f74756a00000000",
6799,
"007c7ae31640a81e092921211a371e039dad1999f280b570ea264bc42eb09df1",
"0100000000000000000000000000000000000000000000000000000000000000000000009c65dfd6ace61ebc96a4c4c5f2263a9d343d4ea412fc659f83dc6515befcb00c65615359ffff00202f0000000101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff1604ffff002001040e6550617373706f7274436861696effffffff0200000000000000002f76a914a7d204562402112cec85cffbad8419934b86f3a988ac1473706b703731000000000000ffffffff65615359750000000000000000131073706b6e0200040101000104726f6f74756a00000000",
6747,
Integer.parseInt(Arrays.toString(version).replaceAll(", |\\[|\\]", ""), 16),
addressChecksum,
0xf5dec1feL
0xf3e9ecf0L
);
private Address masterAddress = Address.fromBase58(params, "1GoqgbPZUV2yuPZXohtAvB2NZbjcew8Rk93mMn");
private Address masterAddress = Address.fromBase58(params, "1PgYKBGnDp3UHBcojWwzSTu7PLyAWgvpKpqjM7");

private BlockChain(Context ctx) {
this.context = ctx;
Expand Down Expand Up @@ -93,7 +93,7 @@ public void removeListener(BlockchainCallBackListener listener) {

public void startDownload() {
BriefLogFormatter.init();
String filePrefix = "voting-wallet";
String filePrefix = "ePassportChain";
File walletFile = new File(Environment.getExternalStorageDirectory() + "/" + Util.FOLDER_DIGITAL_VOTING_PASS);
if (!walletFile.exists()) {
walletFile.mkdirs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,15 @@ public void run() {
@Override
public void run() {
manualInput.setVisibility(View.VISIBLE);
overlay.setMargins(0,0,0,infoText.getHeight() + manualInput.getHeight());
//Add layout listener to update overlay margin when the button has become visible
//If we call setMargins immediately the button is not yet visible and margin will be wrong
manualInput.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
overlay.setMargins(0, 0, 0, controlPanel.getHeight());
manualInput.removeOnLayoutChangeListener(this);
}
});
}
});
}
Expand Down
11 changes: 6 additions & 5 deletions app/src/main/res/layout/activity_transaction_history.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
tools:layout_editor_absoluteY="0dp"
tools:layout_editor_absoluteX="8dp" />

<ProgressBar
<com.github.rahatarmanahmed.cpv.CircularProgressView
android:id="@+id/loading_circle"
style="?android:attr/progressBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true" />
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center"
app:cpv_animAutostart="true"
app:cpv_indeterminate="true" />

<LinearLayout
android:id="@+id/no_transactions"
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,14 @@
<item quantity="other">Stempassen gevonden, kies verzilveren</item>
</plurals>
<plurals name="authorization_confirmed">
<item quantity="one">Stempas succesvol verzilverd, %1$d stembiljet uitrijken.</item>
<item quantity="other">Stempassen succesvol verzilverd, %1$d stembiljetten uitrijken.</item>
<item quantity="one">Stempas succesvol verzilverd, overhandig %1$d stembiljet.</item>
<item quantity="other">Stempassen succesvol verzilverd, overhandig %1$d stembiljetten.</item>
</plurals>
<string name="authorization_wait">Wachten op bevestiging.</string>
<string name="address_not_found">Dit reisdocument is niet geregistreerd als digitale stempas.</string>

<string name="has_right">%s heeft recht op:</string>
<string name="please_hand">Overhandig %s</string>
<string name="voting_pass">Stembiljet</string>
<plurals name="ballot_paper">
<item quantity="one">Stembiljet</item>
Expand Down Expand Up @@ -126,6 +127,6 @@
<string name="transaction_sent_item_format_title">%1$d stempas verzonden \n%2$s %3$s</string>
<string name="transaction_sent_item_format_detail">Naar %s</string>
<string-array name="address_array">
<item>1GoqgbPZUV2yuPZXohtAvB2NZbjcew8Rk93mMn|Overheid</item>
<item>1PgYKBGnDp3UHBcojWwzSTu7PLyAWgvpKpqjM7|Overheid</item>
</string-array>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<string name="transaction_sent_item_format_title">Sent %1$d vote \n%2$s %3$s</string>
<string name="transaction_sent_item_format_detail">To %s</string>
<string-array name="address_array">
<item>1GoqgbPZUV2yuPZXohtAvB2NZbjcew8Rk93mMn|Government</item>
<item>1PgYKBGnDp3UHBcojWwzSTu7PLyAWgvpKpqjM7|Government</item>
</string-array>

<string name="shared_preferences_key_election">com.digitalvotingpass.ELECTION_OBJECT_KEY</string>
Expand Down