mirror of
https://github.com/status-im/syng-client.git
synced 2025-02-24 00:48:10 +00:00
Add Wallet and COntacts default dapps.
This commit is contained in:
parent
4662b24ef0
commit
7ef640213d
@ -48,7 +48,6 @@ import java.nio.MappedByteBuffer;
|
|||||||
import java.nio.channels.FileChannel;
|
import java.nio.channels.FileChannel;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.syng.R;
|
import io.syng.R;
|
||||||
@ -216,10 +215,6 @@ public abstract class BaseActivity extends AppCompatActivity implements
|
|||||||
if (SyngApplication.currentProfile != null) {
|
if (SyngApplication.currentProfile != null) {
|
||||||
mDApps = SyngApplication.currentProfile.getDapps();
|
mDApps = SyngApplication.currentProfile.getDapps();
|
||||||
}
|
}
|
||||||
// Add default Console dapp if not present
|
|
||||||
if (mDApps.size() == 0) {
|
|
||||||
mDApps.add(new Dapp("Console"));
|
|
||||||
}
|
|
||||||
updateAppList(mSearchTextView.getText().toString());
|
updateAppList(mSearchTextView.getText().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,16 +35,36 @@ public class Profile implements Serializable {
|
|||||||
public Profile() {
|
public Profile() {
|
||||||
|
|
||||||
this.privateKeys.add(createPrivateKey());
|
this.privateKeys.add(createPrivateKey());
|
||||||
|
addDefaultApps();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Profile(String privateKey) {
|
public Profile(String privateKey) {
|
||||||
|
|
||||||
this.privateKeys.add(privateKey);
|
this.privateKeys.add(privateKey);
|
||||||
|
addDefaultApps();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Profile(List<String> privateKeys) {
|
public Profile(List<String> privateKeys) {
|
||||||
|
|
||||||
this.privateKeys = privateKeys;
|
this.privateKeys = privateKeys;
|
||||||
|
addDefaultApps();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addDefaultApps() {
|
||||||
|
|
||||||
|
// Add console dapp
|
||||||
|
Dapp console = new Dapp("Console");
|
||||||
|
dapps.add(console);
|
||||||
|
|
||||||
|
// Add wallet dapp
|
||||||
|
Dapp wallet = new Dapp("Wallet");
|
||||||
|
wallet.setUrl("http://syng.io/dapps/wallet");
|
||||||
|
dapps.add(wallet);
|
||||||
|
|
||||||
|
// Add contacts dapp
|
||||||
|
Dapp contacts = new Dapp("Contacts");
|
||||||
|
contacts.setUrl("http://syng.io/dapps/contacts");
|
||||||
|
dapps.add(contacts);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String createPrivateKey() {
|
protected String createPrivateKey() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user