@bloks/wallet
Advanced tools
Comparing version 3.3.23 to 3.4.0
{ | ||
"name": "@bloks/wallet", | ||
"version": "3.3.23", | ||
"version": "3.4.0", | ||
"description": "", | ||
@@ -16,3 +16,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "a4fc3b5a9765b44f622ade215a07a0071d94aad9" | ||
"gitHead": "806a37dc407ed58a4f9ffdb24ec89154d8c29a0c" | ||
} |
import { constants } from '@bloks/constants' | ||
import Provider from './provider' | ||
import { isEosjs1 } from './callbacks' | ||
import { sortAlphaNum } from '@bloks/utils' | ||
@@ -206,2 +207,6 @@ /** | ||
export function updateAuth (account, perm_name, parent, required_auth) { | ||
required_auth.keys = required_auth.keys.sort((a, b) => sortAlphaNum(a.key, b.key)) | ||
required_auth.accounts = required_auth.accounts.sort((a, b) => sortAlphaNum(a.permission.actor, b.permission.actor)) | ||
required_auth.waits = required_auth.waits.sort((a, b) => sortAlphaNum(a.wait_sec, b.wait_sec)) | ||
let actions = [{ | ||
@@ -208,0 +213,0 @@ account: constants.EOSIO, |
@@ -9,4 +9,3 @@ import { defaultCallbacks } from './defaults' | ||
export function isEosjs1 () { | ||
return callbacks.isMultisigMode() || | ||
['ScatterExtension', 'eostock'].includes(User.user.wallet) | ||
return ['ScatterExtension', 'eostock'].includes(User.user.wallet) | ||
} |
@@ -20,16 +20,5 @@ import { callbacks } from './callbacks' | ||
// Remove all observers | ||
actions = JSON.parse(JSON.stringify(actions)) | ||
// Get User | ||
const { | ||
actor, | ||
permission, | ||
wallet, | ||
delay_sec | ||
} = User.user | ||
const { wallet, delay_sec } = User.user | ||
// Create authorization | ||
const authorization = [{ actor, permission }] | ||
// Check that wallet exists | ||
@@ -50,4 +39,5 @@ if (!wallet) { | ||
} | ||
// Add auth to all actions | ||
const authorization = User.getAuthorization() | ||
actions = actions.map(action => { | ||
@@ -54,0 +44,0 @@ action.authorization = authorization |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15148
626