Skip to content

Commit

Permalink
fix: require version + bump versions
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacook committed Jan 25, 2023
1 parent 4e7d01d commit 9584607
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/safe-core-sdk-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/safe-core-sdk-utils",
"version": "1.7.0",
"version": "1.7.1",
"description": "Safe Core SDK Utilities",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/safe-core-sdk-utils/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './eip-3770'
export * from './eip-712'
export * from './safeVersions'
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ const SAFE_FEATURES_BY_VERSION: Record<SAFE_FEATURES, string> = {
[SAFE_FEATURES.ETH_SIGN]: '>=1.1.0'
}

// Note: gatewau returns `SafeInfo['version']` as `null` for unsupported contracts
export const hasSafeFeature = (feature: SAFE_FEATURES, version: string | null): boolean => {
if (!version || !(feature in SAFE_FEATURES_BY_VERSION)) {
export const hasSafeFeature = (feature: SAFE_FEATURES, version: string): boolean => {
if (!(feature in SAFE_FEATURES_BY_VERSION)) {
return false
}

Expand Down
3 changes: 2 additions & 1 deletion packages/safe-core-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/safe-core-sdk",
"version": "3.3.0",
"version": "3.3.1",
"description": "Safe Core SDK",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand Down Expand Up @@ -86,6 +86,7 @@
"dependencies": {
"@ethersproject/solidity": "^5.7.0",
"@safe-global/safe-core-sdk-types": "^1.9.0",
"@safe-global/safe-core-sdk-utils": "^1.7.1",
"@gnosis.pm/safe-deployments": "1.19.0",
"ethereumjs-util": "^7.1.5",
"semver": "^7.3.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/safe-core-sdk/src/Safe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
TransactionOptions,
TransactionResult
} from '@safe-global/safe-core-sdk-types'
import { SAFE_FEATURES, hasSafeFeature } from '@safe-global/safe-core-sdk-utils'
import ContractManager from './managers/contractManager'
import FallbackHandlerManager from './managers/fallbackHandlerManager'
import GuardManager from './managers/guardManager'
Expand All @@ -31,7 +32,6 @@ import {
standardizeMetaTransactionData,
standardizeSafeTransactionData
} from './utils/transactions/utils'
import { SAFE_FEATURES, hasSafeFeature } from './utils/safeVersions'

export interface SafeConfig {
/** ethAdapter - Ethereum adapter */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { EthAdapter, GnosisSafeContract } from '@safe-global/safe-core-sdk-types'
import { SAFE_FEATURES, hasSafeFeature } from '@safe-global/safe-core-sdk-utils'
import { isZeroAddress, sameString } from '../utils'
import { ZERO_ADDRESS } from '../utils/constants'
import { SAFE_FEATURES, hasSafeFeature } from '../utils/safeVersions'

class FallbackHandlerManager {
#ethAdapter: EthAdapter
Expand Down
2 changes: 1 addition & 1 deletion packages/safe-core-sdk/src/managers/guardManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { EthAdapter, GnosisSafeContract } from '@safe-global/safe-core-sdk-types'
import { SAFE_FEATURES, hasSafeFeature } from '@safe-global/safe-core-sdk-utils'
import { isZeroAddress, sameString } from '../utils'
import { ZERO_ADDRESS } from '../utils/constants'
import { SAFE_FEATURES, hasSafeFeature } from '../utils/safeVersions'

class GuardManager {
#ethAdapter: EthAdapter
Expand Down
2 changes: 1 addition & 1 deletion packages/safe-core-sdk/src/utils/transactions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
SafeTransactionData,
SafeTransactionDataPartial
} from '@safe-global/safe-core-sdk-types'
import { SAFE_FEATURES, hasSafeFeature } from '@safe-global/safe-core-sdk-utils'
import { ZERO_ADDRESS } from '../constants'
import { SAFE_FEATURES, hasSafeFeature } from '../safeVersions'
import { estimateTxGas } from './gas'

export function standardizeMetaTransactionData(
Expand Down
4 changes: 2 additions & 2 deletions packages/safe-ethers-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/safe-ethers-lib",
"version": "1.9.0",
"version": "1.9.1",
"description": "Ethers library adapter to be used by Safe Core SDK",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand Down Expand Up @@ -48,7 +48,7 @@
},
"dependencies": {
"@safe-global/safe-core-sdk-types": "^1.9.0",
"@safe-global/safe-core-sdk-utils": "^1.7.0",
"@safe-global/safe-core-sdk-utils": "^1.7.1",
"ethers": "5.7.2"
}
}
4 changes: 2 additions & 2 deletions packages/safe-web3-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/safe-web3-lib",
"version": "1.9.0",
"version": "1.9.1",
"description": "Web3 library adapter to be used by Safe Core SDK",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand Down Expand Up @@ -49,7 +49,7 @@
"dependencies": {
"@ethersproject/bignumber": "^5.7.0",
"@safe-global/safe-core-sdk-types": "^1.9.0",
"@safe-global/safe-core-sdk-utils": "^1.7.0",
"@safe-global/safe-core-sdk-utils": "^1.7.1",
"web3": "^1.8.1",
"web3-core": "^1.8.1",
"web3-utils": "^1.8.1"
Expand Down

0 comments on commit 9584607

Please sign in to comment.