Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@walletconnect/utils

Package Overview
Dependencies
Maintainers
1
Versions
661
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@walletconnect/utils - npm Package Compare versions

Comparing version 1.0.0-beta.29 to 1.0.0-beta.30

1

lib/index.d.ts

@@ -38,2 +38,3 @@ /// <reference types="node" />

export declare function promisify(originalFn: (...args: any[]) => void, thisArg?: any): (...callArgs: any[]) => Promise<IJsonRpcResponseSuccess | IJsonRpcResponseError>;
export declare function isEmptyArray(array: any[]): boolean;
export declare function parsePersonalSign(params: string[]): string[];

@@ -40,0 +41,0 @@ export declare function parseTransactionData(txData: Partial<ITxData>): Partial<ITxData>;

4

package.json
{
"name": "@walletconnect/utils",
"version": "1.0.0-beta.29",
"version": "1.0.0-beta.30",
"description": "Utility Library for WalletConnect",

@@ -61,3 +61,3 @@ "scripts": {

"@ethersproject/strings": "^5.0.0-beta.125",
"@walletconnect/types": "^1.0.0-beta.29",
"@walletconnect/types": "^1.0.0-beta.30",
"bignumber.js": "^8.1.1"

@@ -64,0 +64,0 @@ },

@@ -41,2 +41,3 @@ # WalletConnect Utils

function isEmptyString (value: string): boolean
function isEmptyArray (array: any[]): boolean

@@ -43,0 +44,0 @@ function payloadId (): number

@@ -102,3 +102,3 @@ import BigNumber from 'bignumber.js'

export function convertUtf8ToBuffer (utf8: string): Buffer {
const result = new Buffer(utf8, 'utf8')
const result = Buffer.from(utf8, 'utf8')
return result

@@ -153,3 +153,3 @@ }

hex = removeHexPrefix(hex)
const buffer = new Buffer(hex, 'hex')
const buffer = Buffer.from(hex, 'hex')
return buffer

@@ -473,4 +473,8 @@ }

export function isEmptyArray (array: any[]): boolean {
return !(array && array.length)
}
export function parsePersonalSign (params: string[]): string[] {
if (!isHexString(params[0])) {
if (!isEmptyArray(params) && !isHexString(params[0])) {
params[0] = convertUtf8ToHex(params[0])

@@ -477,0 +481,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc