Skip to content

Commit 287b2e6

Browse files
committed
fix meta initialisation error
1 parent 71c9487 commit 287b2e6

File tree

1 file changed

+9
-0
lines changed
  • raveandroid/src/main/java/com/flutterwave/raveandroid

1 file changed

+9
-0
lines changed

raveandroid/src/main/java/com/flutterwave/raveandroid/Payload.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.google.gson.annotations.SerializedName;
44

5+
import java.util.ArrayList;
56
import java.util.List;
67

78
/**
@@ -38,6 +39,10 @@ public Payload(List<Meta> meta, String narration,
3839
this.cardno = cardno;
3940
this.txRef = txRef;
4041

42+
if (meta == null) {
43+
meta = new ArrayList<>();
44+
}
45+
4146
meta.add(new Meta("sdk", "android"));
4247
}
4348

@@ -60,6 +65,10 @@ public Payload(List<Meta> meta, String narration, String IP, String accountnumbe
6065
this.txRef = txRef;
6166
this.PBFPubKey = PBFPubKey;
6267

68+
if (meta == null) {
69+
meta = new ArrayList<>();
70+
}
71+
6372
meta.add(new Meta("sdk", "android"));
6473
}
6574

0 commit comments

Comments
 (0)