Skip to content

Commit

Permalink
chore(release): 3.2.0
Browse files Browse the repository at this point in the history
## [3.2.0](v3.1.1...v3.2.0) (2024-03-05)

### Features

* deepPartial ([#329](#329)) ([#330](#330)) ([f2bb64d](f2bb64d))

 [skip ci]
  • Loading branch information
semantic-release-bot committed Mar 5, 2024
1 parent f2bb64d commit 18cc31b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [3.2.0](https://github.com/NibiruChain/ts-sdk/compare/v3.1.1...v3.2.0) (2024-03-05)

### Features

- deepPartial ([#329](https://github.com/NibiruChain/ts-sdk/issues/329)) ([#330](https://github.com/NibiruChain/ts-sdk/issues/330)) ([f2bb64d](https://github.com/NibiruChain/ts-sdk/commit/f2bb64dc2dbfd2af356778a01b806db8bbcfa923))

### [3.1.1](https://github.com/NibiruChain/ts-sdk/compare/v3.1.0...v3.1.1) (2024-02-29)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nibiruchain/nibijs",
"description": "The TypeScript SDK for the Nibiru blockchain.",
"version": "3.1.1",
"version": "3.2.0",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/gql/query/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ export * from "./featureFlags"
export * from "./governance"
export * from "./ibc"
export * from "./inflation"
export * from "./marketing"
export * from "./markPriceCandles"
export * from "./marketing"
export * from "./oracle"
export * from "./perp"
export * from "./redelegations"
export * from "./spotLpPositions"
export * from "./spotPoolCreated"
export * from "./spotPoolExited"
export * from "./spotPoolJoined"
export * from "./spotPools"
export * from "./spotPoolSwap"
export * from "./spotPools"
export * from "./stats"
export * from "./unbondings"
export * from "./users"
Expand Down
18 changes: 9 additions & 9 deletions src/gql/utils/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ export const checkFields = <T>(objects: T[], fields: string[]) => {

export const queryBatchHandler = async <T>(
queryQueryStrings: string[],
endpt: string,
endpt: string
) => <T>doGqlQuery(`{ ${queryQueryStrings.join("\n")} }`, endpt)

export const arg = <T>(
name: string,
value: unknown,
ignoreQuotes?: boolean,
ignoreQuotes?: boolean
) => {
const isString = typeof value === "string" && !ignoreQuotes ? `"` : ""

Expand Down Expand Up @@ -101,7 +101,7 @@ export const getWhereArgArr = <T>(whereArgs: IterableDictionary<T>) =>
`where: ${objToGql(whereArgs)}`

export const convertObjectToPropertiesString = <T>(
obj: IterableDictionary<T>,
obj: IterableDictionary<T>
) => {
let result = ""

Expand All @@ -115,14 +115,14 @@ export const convertObjectToPropertiesString = <T>(
${Object.keys(item)
.map((k) => `${k}`)
.join("\n")}
}`,
}`
)
.join("\n")
result += `${innerString}\n`
} else if (typeof value === "object" && value !== null) {
result += `${key} {
${convertObjectToPropertiesString(
value as IterableDictionary<T>,
value as IterableDictionary<T>
)}
}\n`
} else {
Expand Down Expand Up @@ -151,20 +151,20 @@ export const gqlQuery = <T>(
name: string,
typedQueryArgs: IterableDictionary<T>,
properties: string,
excludeParentObject?: boolean,
excludeParentObject?: boolean
) => {
const queryArgList = []

if (typedQueryArgs.where !== undefined) {
queryArgList.push(
getWhereArgArr(typedQueryArgs.where as IterableDictionary<T>),
getWhereArgArr(typedQueryArgs.where as IterableDictionary<T>)
)
}

delete typedQueryArgs.where

Object.keys(typedQueryArgs).forEach((key) =>
queryArgList.push(arg<T>(key, typedQueryArgs[key], true)),
queryArgList.push(arg<T>(key, typedQueryArgs[key], true))
)

const hasQueryList = (char: string) => (queryArgList.length > 0 ? char : "")
Expand All @@ -179,7 +179,7 @@ export const gqlQuery = <T>(
export const doGqlQuery = async <T>(
gqlQuery: string,
gqlEndpt: string,
headers?: HeadersInit,
headers?: HeadersInit
) => {
const rawResp = await fetch(gqlEndpt, {
method: "POST",
Expand Down

0 comments on commit 18cc31b

Please sign in to comment.