@ocap/client
Advanced tools
Comparing version 1.8.1 to 1.8.2
@@ -496,6 +496,6 @@ export as namespace GraphQLClient; | ||
export interface PageInputInput {} | ||
export interface PageOrderInput {} | ||
export interface PagingInput {} | ||
export interface RangeFilterInput {} | ||
@@ -1956,4 +1956,4 @@ | ||
export interface ListTopAccountsParams { | ||
paging: undefined; | ||
tokenAddress: string; | ||
paging: undefined; | ||
} | ||
@@ -1960,0 +1960,0 @@ |
@@ -5,5 +5,3 @@ /* eslint-disable no-underscore-dangle */ | ||
const camelCase = require('lodash/camelCase'); | ||
const snakeCase = require('lodash/snakeCase'); | ||
const padStart = require('lodash/padStart'); | ||
const errorCodes = require('@ocap/proto/lib/gen/status-code.json'); | ||
const { isValid: isValidDID, toTypeInfo } = require('@arcblock/did'); | ||
@@ -141,13 +139,2 @@ const { toDelegateAddress, toSwapAddress, toAssetAddress, toTokenAddress } = require('@arcblock/did-util'); | ||
if (typeof client._createResponseError !== 'function') { | ||
client._createResponseError = (code, method) => { | ||
const type = snakeCase(method); | ||
const message = (errorCodes[code][type] || errorCodes[code].default || code).trim(); | ||
const error = new Error(`${code}: ${message}`); | ||
error.code = code; | ||
error.type = type; | ||
return error; | ||
}; | ||
} | ||
/** | ||
@@ -349,12 +336,2 @@ * Ensure a connection is bootstrapped with some meta info fetched from chain node | ||
} catch (err) { | ||
if (Array.isArray(err.errors)) { | ||
const code = err.errors[0].message; | ||
if (errorCodes[code]) { | ||
const error = client._createResponseError(code, x); | ||
error.errors = err.errors; | ||
reject(error); | ||
return; | ||
} | ||
} | ||
reject(err); | ||
@@ -454,5 +431,4 @@ } | ||
// If there is no data attached to the account, we can attach wallet type by default | ||
const typeData = wallet.type; | ||
if (!itxData && typeData) { | ||
itxData = { typeUrl: 'json', value: toTypeInfo(typeData, true) }; | ||
if (!itxData) { | ||
itxData = { typeUrl: 'json', value: toTypeInfo(wallet.toAddress(), true) }; | ||
} | ||
@@ -459,0 +435,0 @@ |
@@ -1742,4 +1742,4 @@ # OCAP GraphQL API List | ||
* **paging**, optional, null | ||
* **tokenAddress**, optional, null | ||
* **paging**, optional, null | ||
@@ -1746,0 +1746,0 @@ #### Result Format |
@@ -7,5 +7,3 @@ 'use strict'; | ||
const camelCase = require('lodash/camelCase'); | ||
const snakeCase = require('lodash/snakeCase'); | ||
const padStart = require('lodash/padStart'); | ||
const errorCodes = require('@ocap/proto/lib/gen/status-code.json'); | ||
const { isValid: isValidDID, toTypeInfo } = require('@arcblock/did'); | ||
@@ -143,13 +141,2 @@ const { toDelegateAddress, toSwapAddress, toAssetAddress, toTokenAddress } = require('@arcblock/did-util'); | ||
if (typeof client._createResponseError !== 'function') { | ||
client._createResponseError = (code, method) => { | ||
const type = snakeCase(method); | ||
const message = (errorCodes[code][type] || errorCodes[code].default || code).trim(); | ||
const error = new Error(`${code}: ${message}`); | ||
error.code = code; | ||
error.type = type; | ||
return error; | ||
}; | ||
} | ||
/** | ||
@@ -351,12 +338,2 @@ * Ensure a connection is bootstrapped with some meta info fetched from chain node | ||
} catch (err) { | ||
if (Array.isArray(err.errors)) { | ||
const code = err.errors[0].message; | ||
if (errorCodes[code]) { | ||
const error = client._createResponseError(code, x); | ||
error.errors = err.errors; | ||
reject(error); | ||
return; | ||
} | ||
} | ||
reject(err); | ||
@@ -456,5 +433,4 @@ } | ||
// If there is no data attached to the account, we can attach wallet type by default | ||
const typeData = wallet.type; | ||
if (!itxData && typeData) { | ||
itxData = { typeUrl: 'json', value: toTypeInfo(typeData, true) }; | ||
if (!itxData) { | ||
itxData = { typeUrl: 'json', value: toTypeInfo(wallet.toAddress(), true) }; | ||
} | ||
@@ -461,0 +437,0 @@ |
@@ -496,6 +496,6 @@ export as namespace GraphQLClient; | ||
export interface PageInputInput {} | ||
export interface PageOrderInput {} | ||
export interface PagingInput {} | ||
export interface RangeFilterInput {} | ||
@@ -1956,4 +1956,4 @@ | ||
export interface ListTopAccountsParams { | ||
paging: undefined; | ||
tokenAddress: string; | ||
paging: undefined; | ||
} | ||
@@ -1960,0 +1960,0 @@ |
{ | ||
"name": "@ocap/client", | ||
"version": "1.8.1", | ||
"version": "1.8.2", | ||
"description": "graphql client to read/write data on forge powered blockchain", | ||
@@ -31,10 +31,10 @@ "keywords": [ | ||
"dependencies": { | ||
"@arcblock/did": "^1.8.1", | ||
"@arcblock/did-util": "^1.8.1", | ||
"@arcblock/did": "^1.8.2", | ||
"@arcblock/did-util": "^1.8.2", | ||
"@arcblock/sdk-util": "^0.29.1", | ||
"@ocap/mcrypto": "^1.8.1", | ||
"@ocap/message": "^1.8.1", | ||
"@ocap/proto": "^1.8.1", | ||
"@ocap/util": "^1.8.1", | ||
"@ocap/wallet": "^1.8.1", | ||
"@ocap/mcrypto": "^1.8.2", | ||
"@ocap/message": "^1.8.2", | ||
"@ocap/proto": "^1.8.2", | ||
"@ocap/util": "^1.8.2", | ||
"@ocap/wallet": "^1.8.2", | ||
"blueimp-md5": "^2.10.0", | ||
@@ -108,3 +108,3 @@ "debug": "^4.3.1", | ||
}, | ||
"gitHead": "36ea9aa291e248b26bb8ec173e1b64f8a73a0572" | ||
"gitHead": "3b5b3fc85bba1a05ead241f70613d5d77bcbac27" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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 too big to display
Sorry, the diff of this file is too big to display
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 too big to display
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 too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
3190605
50083
Updated@arcblock/did@^1.8.2
Updated@arcblock/did-util@^1.8.2
Updated@ocap/mcrypto@^1.8.2
Updated@ocap/message@^1.8.2
Updated@ocap/proto@^1.8.2
Updated@ocap/util@^1.8.2
Updated@ocap/wallet@^1.8.2