2016-08-03 13:15:04 +00:00
|
|
|
status.command({
|
2016-10-18 11:01:22 +00:00
|
|
|
name: "browse",
|
2016-11-22 12:50:52 +00:00
|
|
|
title: I18n.t('browse_title'),
|
|
|
|
description: I18n.t('browse_description'),
|
2016-08-03 13:15:04 +00:00
|
|
|
color: "#ffa500",
|
|
|
|
fullscreen: true,
|
2017-03-12 11:20:56 +00:00
|
|
|
onSend: function (params, context) {
|
|
|
|
var url = 'https://status.im/dapps/wallet';
|
|
|
|
if (context.debug) {
|
|
|
|
url = 'http://127.0.0.1:3450';
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
title: "Wallet",
|
|
|
|
dynamicTitle: false,
|
|
|
|
markup: status.components.bridgedWebView(url)
|
|
|
|
};
|
|
|
|
}
|
2016-08-03 13:15:04 +00:00
|
|
|
});
|
|
|
|
|
2016-10-18 11:01:22 +00:00
|
|
|
status.autorun("browse");
|
2016-10-20 13:51:37 +00:00
|
|
|
|
|
|
|
status.registerFunction("send", function (params, context) {
|
|
|
|
var data = {
|
|
|
|
from: context.from,
|
|
|
|
to: params.address,
|
|
|
|
value: web3.toWei(params.amount, "ether")
|
|
|
|
};
|
|
|
|
|
|
|
|
web3.eth.sendTransaction(data);
|
|
|
|
})
|