File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
packages/blockchain-wallet-v4/src/types Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,6 @@ import * as Options from './Options'
8
8
import Type from './Type'
9
9
import * as Wallet from './Wallet'
10
10
11
- let _window = { }
12
- if ( typeof window === 'undefined' || ! window ) _window = { }
13
- else _window = window
14
-
15
- // Global Crypto object
16
- const { Crypto } = _window
17
-
18
11
const PAYLOAD_VERSION = crypto . SUPPORTED_ENCRYPTION_VERSION
19
12
20
13
/* Wrapper :: {
@@ -149,7 +142,7 @@ export const fromEncPayload = curry((password, payload) => {
149
142
const wrapper = {
150
143
password,
151
144
payload : JSON . stringify ( payload ) ,
152
- payload_checksum : Crypto ? Crypto . SHA256 ( JSON . stringify ( payload ) , { asHex : true } ) : undefined ,
145
+ payload_checksum : crypto . sha256 ( JSON . stringify ( payload ) ) . toString ( 'hex' ) ,
153
146
pbkdf2Iterations,
154
147
version
155
148
}
You can’t perform that action at this time.
0 commit comments