mirror of
https://github.com/DanielPollithy/flashwifi.git
synced 2025-10-16 11:45:32 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
964347ed27
17
SUBMISSION.MD
Normal file
17
SUBMISSION.MD
Normal file
@ -0,0 +1,17 @@
|
||||
**Email Address**: tobiaswoerthle@gmail.com, daniel@pollithy.com, [Wlad's email]
|
||||
|
||||
**Full Name**: Tobias Woerthle, Daniel Pollithy, Wlad Meixner
|
||||
|
||||
**Name of Project**: Wifiota
|
||||
|
||||
**Description of your project**: Buy and sell data from your android device with WiFi direct paired peers through a generated hotspot. Transactions occur via the IOTA tangle and Flash Channels.
|
||||
|
||||
**Link to demo of project**: https://tobywoerthle.github.io/flashWiFiSite/
|
||||
|
||||
**Type of Project**: Peer to Peer Payments
|
||||
|
||||
**Any further comments**:
|
||||
GitHub - https://github.com/DanielPollithy/flashwifi
|
||||
|
||||
**Submisison Form**:
|
||||
https://docs.google.com/forms/d/e/1FAIpQLSe28W7jk-y4iEd8kN0mznk7oEs6ZtxQNL49R6tpc4bGN04UBA/viewform
|
||||
@ -21,8 +21,11 @@ public class WalletAddressChecker {
|
||||
private Context context;
|
||||
private String prefFile;
|
||||
|
||||
boolean containsPendingTransaction = false;
|
||||
boolean keyIndexChanged = false;
|
||||
private boolean containsPendingTransaction = false;
|
||||
private boolean keyIndexChanged = false;
|
||||
private int keyIndex;
|
||||
private String nextAddress;
|
||||
|
||||
|
||||
public WalletAddressChecker(Context inContext, String inPrefFile){
|
||||
|
||||
@ -62,11 +65,13 @@ public class WalletAddressChecker {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<String> getAddress(String seed) {
|
||||
|
||||
Boolean foundAddress = false;
|
||||
List<String> addressList = new ArrayList<>();
|
||||
int keyIndex = getKeyIndex();
|
||||
keyIndex = getKeyIndex();
|
||||
ArrayList<String> hashStringList = new ArrayList<>();
|
||||
|
||||
while(foundAddress == false){
|
||||
@ -102,6 +107,7 @@ public class WalletAddressChecker {
|
||||
|
||||
if(transactionsForAddress == null || transactionsForAddress.isEmpty() || (transactionsForAddress.size() == 0)){
|
||||
//Transactions not found, use this address
|
||||
nextAddress = addressResponse.getAddresses().get(0);
|
||||
foundAddress = true;
|
||||
}
|
||||
else{
|
||||
@ -151,6 +157,14 @@ public class WalletAddressChecker {
|
||||
return addressList;
|
||||
}
|
||||
|
||||
public int getNextKeyIndex(){
|
||||
return keyIndex;
|
||||
}
|
||||
|
||||
public String getNextAddress(){
|
||||
return nextAddress;
|
||||
}
|
||||
|
||||
private int getKeyIndex() {
|
||||
SharedPreferences sharedPref = context.getSharedPreferences(prefFile, Context.MODE_PRIVATE);
|
||||
int keyIndex = sharedPref.getInt("keyIndex",0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user