Skip to content

Commit

Permalink
finish refactoring ops to mv3
Browse files Browse the repository at this point in the history
  • Loading branch information
stoodkev committed Mar 1, 2022
1 parent 1253be6 commit 45f3bc7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions example/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,25 +248,25 @@ <h3>Broadcast Create New claimed account</h3>
type="text"
placeholder="owner"
id="create_claimed_owner"
value='{"weight_threshold": 1,"account_auths": [],"key_auths":[["SMT...",1]]}'
value='{"weight_threshold": 1,"account_auths": [],"key_auths":[["STM6M7zSahc4jEhQ8SR5ZZBufRuFS2Wx4pJZm6fbc8a5apbd1wnCG",1]]}'
/>
<input
type="text"
placeholder="active"
id="create_claimed_active"
value='{"weight_threshold": 1,"account_auths": [],"key_auths":[["SMT...",1]]}'
value='{"weight_threshold": 1,"account_auths": [],"key_auths":[["STM5MrUhAJ5jyBf7hY9NFJwNUpgbaK6ZU8haWRnxzfbvTnVo6MKb7",1]]}'
/>
<input
type="text"
placeholder="posting"
id="create_claimed_posting"
value='{"weight_threshold": 1,"account_auths": [],"key_auths":[["SMT...",1]]}'
value='{"weight_threshold": 1,"account_auths": [],"key_auths":[["STM7hZtpBMRi3wJpyGWnyMUT2MBW7ggkfL7E7juwr5YSUsxMwk3RY",1]]}'
/>
<input
type="text"
placeholder="memo"
id="create_claimed_memo"
value="STM..."
value="STM6BnC2ceS5Z83kHbvBMyCRwvFMxvNdTGEG2YweDcYgWgnLCoQtZ"
/>
<button id="send_create_claimed">Send</button>
<h3>Signed Call</h3>
Expand Down
7 changes: 4 additions & 3 deletions src/background/requests/operations/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { RequestsHandler } from '@background/requests';
import { removeWindow } from '@background/requests/dialog-lifecycle';
import sendErrors from '@background/requests/errors';
import { addAccount } from '@background/requests/operations/ops/add-account';
import {
broadcastAddAccountAuthority,
broadcastAddKeyAuthority,
Expand Down Expand Up @@ -51,9 +52,9 @@ export const performOperation = async (
Logger.info('-- PERFORMING TRANSACTION --');
Logger.log(data);
switch (data.type) {
// case KeychainRequestTypes.addAccount:
// message = await addAccount(requestHandler, data);
// break;
case KeychainRequestTypes.addAccount:
message = await addAccount(requestHandler, data);
break;
case KeychainRequestTypes.custom:
message = await broadcastCustomJson(requestHandler, data);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const broadcastCreateClaimedAccount = async (
let err, result;
const client = requestHandler.getHiveClient();
let key = requestHandler.data.key;
console.log(client, key);
try {
result = await client.broadcast.sendOperations(
[
Expand Down
1 change: 0 additions & 1 deletion src/utils/account.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ const getAccountsFromLocalStorage = async (
const encryptedAccounts = await LocalStorageUtils.getValueFromLocalStorage(
LocalStorageKeyEnum.ACCOUNTS,
);
console.log(encryptedAccounts, mk);
const accounts = EncryptUtils.decryptToJson(encryptedAccounts, mk);
return accounts?.list;
};
Expand Down

0 comments on commit 45f3bc7

Please sign in to comment.