Skip to content

Commit bfc0de1

Browse files
Correct account initialization
1 parent ff42d6d commit bfc0de1

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

app/src/main/java/com/flutterwave/rave_android/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private void validateEntries() {
8383
amount = "0";
8484
}
8585

86-
//check for complusory fields
86+
//check for compulsory fields
8787
if (!Utils.isEmailValid(email)) {
8888
valid = false;
8989
emailEt.setError("A valid email is required");

raveandroid/src/main/java/com/flutterwave/raveandroid/account/AccountFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ private void validateDetails() {
227227
builder.setAmount(amount)
228228
.setEmail(email)
229229
.setCountry("NG").setCurrency("NGN")
230-
.setPBFPubKey(RaveConstants.PUBLIC_KEY)
230+
.setPBFPubKey(ravePayInitializer.getPublicKey())
231231
.setDevice_fingerprint(Utils.getDeviceImei(getActivity()))
232232
.setIP(Utils.getDeviceImei(getActivity())).setTxRef(txRef)
233233
.setAccountbank(selectedBank.getBankcode())
@@ -449,7 +449,7 @@ public void onPageStarted(WebView view, String url, Bitmap favicon) {
449449
public void onPageFinished(WebView view, String url) {
450450
super.onPageFinished(view, url);
451451
if (url.contains("/complete") || url.contains("submitting_mock_form")) {
452-
presenter.requeryTx(flwRef, RaveConstants.PRIVATE_KEY);
452+
presenter.requeryTx(flwRef, ravePayInitializer.getSecretKey());
453453
}
454454

455455
// Log.d("URLS", url);

raveandroid/src/main/res/layout/fragment_account.xml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,14 @@
2525
android:id="@+id/amountTil"
2626
android:layout_width="match_parent"
2727
android:layout_height="wrap_content"
28-
android:layout_marginLeft="10dp"
29-
android:layout_marginRight="10dp">
28+
android:layout_marginLeft="20dp"
29+
android:layout_marginRight="20dp">
3030

3131
<android.support.design.widget.TextInputEditText
3232
android:id="@+id/amountTV"
3333
android:layout_width="match_parent"
3434
android:layout_height="wrap_content"
3535
android:layout_below="@+id/card1"
36-
android:layout_marginBottom="10dp"
37-
android:layout_marginLeft="10dp"
38-
android:layout_marginRight="10dp"
3936
android:hint="@string/amount"
4037
android:inputType="numberDecimal" />
4138

@@ -45,17 +42,14 @@
4542
android:id="@+id/phoneTil"
4643
android:layout_width="match_parent"
4744
android:layout_height="wrap_content"
48-
android:layout_marginLeft="10dp"
49-
android:layout_marginRight="10dp">
45+
android:layout_marginLeft="20dp"
46+
android:layout_marginRight="20dp">
5047

5148
<android.support.design.widget.TextInputEditText
5249
android:id="@+id/phoneEt"
5350
android:layout_width="match_parent"
5451
android:layout_height="wrap_content"
5552
android:layout_below="@+id/card1"
56-
android:layout_marginBottom="10dp"
57-
android:layout_marginLeft="10dp"
58-
android:layout_marginRight="10dp"
5953
android:hint="@string/phone_number"
6054
android:inputType="numberDecimal" />
6155

@@ -65,17 +59,15 @@
6559
android:id="@+id/emailTil"
6660
android:layout_width="match_parent"
6761
android:layout_height="wrap_content"
68-
android:layout_marginLeft="10dp"
69-
android:layout_marginRight="10dp">
62+
android:layout_marginLeft="20dp"
63+
android:layout_marginBottom="10dp"
64+
android:layout_marginRight="20dp">
7065

7166
<android.support.design.widget.TextInputEditText
7267
android:id="@+id/emailEt"
7368
android:layout_width="match_parent"
7469
android:layout_height="wrap_content"
7570
android:layout_below="@+id/card1"
76-
android:layout_marginBottom="10dp"
77-
android:layout_marginLeft="10dp"
78-
android:layout_marginRight="10dp"
7971
android:hint="@string/email_address"
8072
android:inputType="textEmailAddress" />
8173

@@ -85,7 +77,6 @@
8577
android:id="@+id/bankEditText"
8678
android:layout_width="match_parent"
8779
android:layout_height="wrap_content"
88-
android:layout_marginBottom="10dp"
8980
android:layout_marginLeft="20dp"
9081
android:layout_marginRight="20dp"
9182
android:focusableInTouchMode="false"

0 commit comments

Comments
 (0)