Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nibijs): tests #244

Merged
merged 5 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion packages/indexer-nibi/src/heart-monitor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,20 @@ const testMarkPriceCandlesSubscription = async (
}

test("markPriceCandlesSubscription", async () => {
await testMarkPriceCandlesSubscription({ limit: 1 })
await testMarkPriceCandlesSubscription({
limit: 1,
where: {
pairEq: "ubtc:unusd",
periodEq: 100000000,
},
})
await testMarkPriceCandlesSubscription(
{
limit: 1,
where: {
pairEq: "ubtc:unusd",
periodEq: 100000000,
},
},
defaultMarkPriceCandles
)
Expand Down
36 changes: 0 additions & 36 deletions packages/nibijs/docs/classes/ErrorTxBroadcast.md

This file was deleted.

36 changes: 0 additions & 36 deletions packages/nibijs/docs/classes/ErrorTxSimulation.md

This file was deleted.

2 changes: 1 addition & 1 deletion packages/nibijs/docs/classes/StableSwap.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ y()
Calculate x[j] if one makes x[i] = x

Done by solving quadratic equation iteratively.
x*1**2 + x1 * (sum' - (A*n**n - 1) * D / (A _ n**n)) = D ** (n+1)/(n \*\* (2 _ n) \_ prod' \* A)
x*1\*\*2 + x1 * (sum' - (A*n\*\*n - 1) * D / (A _ n**n)) = D ** (n+1)/(n \*\* (2 _ n) \_ prod' \* A)
x_1\*\*2 + b\*x_1 = c

x_1 = (x_1\**2 + c) / (2*x_1 + b)
Expand Down
103 changes: 0 additions & 103 deletions packages/nibijs/docs/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
### Classes

- [CustomChain](classes/CustomChain.md)
- [ErrorTxBroadcast](classes/ErrorTxBroadcast.md)
- [ErrorTxSimulation](classes/ErrorTxSimulation.md)
- [MsgFactory](classes/MsgFactory.md)
- [NibiruQueryClient](classes/NibiruQueryClient.md)
- [NibiruSigningClient](classes/NibiruSigningClient.md)
Expand Down Expand Up @@ -60,7 +58,6 @@
- [Localnet](modules.md#localnet)
- [Msg](modules.md#msg)
- [PERP_MSG_TYPE_URLS](modules.md#perp_msg_type_urls)
- [PerpErrors](modules.md#perperrors)
- [SPOT_MSG_TYPE_URLS](modules.md#spot_msg_type_urls)
- [nibiruRegistryTypes](modules.md#nibiruregistrytypes)
- [perpTypes](modules.md#perptypes)
Expand All @@ -74,11 +71,9 @@
- [chainToParts](modules.md#chaintoparts)
- [faucetUrlFromChain](modules.md#fauceturlfromchain)
- [fromSdkDec](modules.md#fromsdkdec)
- [fromSdkDecSafe](modules.md#fromsdkdecsafe)
- [fromSdkInt](modules.md#fromsdkint)
- [getRegistry](modules.md#getregistry)
- [go](modules.md#go)
- [instanceOfError](modules.md#instanceoferror)
- [isMsgAddMarginEncodeObject](modules.md#ismsgaddmarginencodeobject)
- [isMsgClosePositionEncodeObject](modules.md#ismsgclosepositionencodeobject)
- [isMsgCreatePoolEncodeObject](modules.md#ismsgcreatepoolencodeobject)
Expand All @@ -95,7 +90,6 @@
- [newRandomWallet](modules.md#newrandomwallet)
- [newSignerFromMnemonic](modules.md#newsignerfrommnemonic)
- [queryChainIdWithRest](modules.md#querychainidwithrest)
- [raises](modules.md#raises)
- [setupEpochsExtension](modules.md#setupepochsextension)
- [setupInflationExtension](modules.md#setupinflationextension)
- [setupOracleExtension](modules.md#setuporacleextension)
Expand Down Expand Up @@ -170,20 +164,6 @@

---

### PerpErrors

• `Const` **PerpErrors**: `Object`

#### Index signature

▪ [key: `string`]: `string`

#### Defined in

[chain/error.ts:40](https://github.com/NibiruChain/ts-sdk/blob/1da2942/packages/nibijs/src/chain/error.ts#L40)

---

### SPOT_MSG_TYPE_URLS

• `Const` **SPOT_MSG_TYPE_URLS**: `Object`
Expand Down Expand Up @@ -360,26 +340,6 @@ Constructs a faucet URL from a Chain object.

---

### fromSdkDecSafe

▸ **fromSdkDecSafe**(`inStr`): `number`

#### Parameters

| Name | Type |
| :------ | :------- |
| `inStr` | `string` |

#### Returns

`number`

#### Defined in

[chain/parse.ts:154](https://github.com/NibiruChain/ts-sdk/blob/1da2942/packages/nibijs/src/chain/parse.ts#L154)

---

### fromSdkInt

▸ **fromSdkInt**(`intStr`): `number`
Expand Down Expand Up @@ -440,45 +400,6 @@ Constructs a faucet URL from a Chain object.

---

### instanceOfError

▸ **instanceOfError**(`obj`): obj is Error

A function for strongly typing errors. The errors given in
catch blocks are not typed by default. This means they may not
have the message and name attributes.

#### Parameters

| Name | Type |
| :---- | :---- |
| `obj` | `any` |

#### Returns

obj is Error

**`Example`**

```js
try {
functionThatThrowsError()
} catch (err) {
if (!instanceOfError(err)) {
throw err
}
alert(err.message)
}
```

**`Export`**

#### Defined in

[chain/error.ts:21](https://github.com/NibiruChain/ts-sdk/blob/1da2942/packages/nibijs/src/chain/error.ts#L21)

---

### isMsgAddMarginEncodeObject

▸ **isMsgAddMarginEncodeObject**(`encodeObject`): `boolean`
Expand Down Expand Up @@ -813,30 +734,6 @@ A wallet for protobuf based signing using SIGN_MODE_DIRECT

---

### raises

▸ **raises**(`errs`, `err`): `boolean`

Makes sure one of the errors in 'errs' is contained in 'err'. If none of the
given exceptions are raised, it returns false.

#### Parameters

| Name | Type |
| :----- | :--------- |
| `errs` | `string`[] |
| `err` | `Error` |

#### Returns

`boolean`

#### Defined in

[chain/error.ts:53](https://github.com/NibiruChain/ts-sdk/blob/1da2942/packages/nibijs/src/chain/error.ts#L53)

---

### setupEpochsExtension

▸ **setupEpochsExtension**(`base`): [`EpochsExtension`](interfaces/EpochsExtension.md)
Expand Down
54 changes: 0 additions & 54 deletions packages/nibijs/src/chain/error.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/nibijs/src/chain/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from "./chain"
export * from "./error"
export * from "./parse"
export * from "./types"
export * from "./useFaucet"
Loading