You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The account parameter is required for users having multiple keychain accounts.
37
+
var keystationAccount ="";
35
38
```
36
39
37
40
```js
@@ -45,16 +48,19 @@ var popup = keystation.openWindow("signin", prefix);
45
48
var txJson = {"account_number":"18012","chain_id":"cosmoshub-2","fee":{"amount":[{"amount":"5000","denom":"uatom"}],"gas":"200000"},"memo":"","msgs":[{"type":"cosmos-sdk/MsgSend","value":{"amount":[{"amount":"10000","denom":"uatom"}],"from_address":"cosmos1z67fshyr48pa9a6htdz4qd0zullfk6y0fgvxv7","to_address":"cosmos10nv3yj0jdxf02vxyc0tavf97fdvppdth6wmcn3"}}],"sequence":"24"};
46
49
47
50
var txJsonStr =JSON.stringify(txJson);
48
-
var popup =keystation.openWindow("transaction", txJsonStr);
51
+
var popup =keystation.openWindow("transaction", txJsonStr, keystationAccount);
49
52
```
50
53
51
54
```js
52
55
// add an EventListener
53
56
window.addEventListener("message", function(e) {
54
57
if (e.origin!="https://keystation.cosmostation.io") return;
55
58
console.log(e.data);
59
+
// e.data.account : User's keychain account. Remember this account!
60
+
keystationAccount =e.data.account;
56
61
} , false);
57
62
```
63
+
If the user is log in as Alice, he or she should use Alice account to sign transaction.
<p>You MUST press "Save" in order to complete registration of your account. If this pop-up does not appear, please press the Key logo on the top right corner of your browser.</p>
0 commit comments