Skip to content

Commit

Permalink
Vault base (#44)
Browse files Browse the repository at this point in the history
* [vault-base] remove verified

* [vault-base] improve staker actions

* [vault-base] change readme

* [vault-base] change readme

* [vault-base] fixes
  • Loading branch information
Cast0001 authored Dec 8, 2023
1 parent fd27733 commit fa50194
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

The official SDK designed for effortless data retrieval from the StakeWise platform. This SDK provides a streamlined interface over GraphQL requests and contract interactions.

![Version](https://img.shields.io/badge/version-1.5.0-blue)
![Version](https://img.shields.io/badge/version-1.5.1-blue)
![Unit Tests](https://github.com/stakewise/v3-sdk/actions/workflows/unit-tests.yml/badge.svg)
![GitHub issues](https://img.shields.io/github/issues-raw/stakewise/v3-sdk)
![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/stakewise/v3-sdk)
Expand Down Expand Up @@ -337,7 +337,6 @@ type Output = {
apy: number
isErc20: boolean
capacity: string
verified: boolean
createdAt: number
feePercent: number
isPrivate: boolean
Expand Down Expand Up @@ -367,7 +366,6 @@ type Output = {
| `apy` | Current vault apy |
| `isErc20` | Does the vault have its own ERC20 token |
| `capacity` | Maximum TVL of Vault |
| `verified` | Has the vault been verified |
| `createdAt` | Date of Creation |
| `feePercent` | Commission rate |
| `isPrivate` | Whether the storage is private |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"version": "1.2.2",
"sideEffects": false,
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"license": "AGPL-3.0-only",
"name": "@stakewise/v3-sdk",
"typings": "dist/index.d.ts",
"module": "dist/index.esm.js",
"description": "StakeWise v3 SDK",
"homepage": "https://app.stakewise.io",
"scripts": {
Expand Down
7 changes: 7 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ const config = [
sourcemap: true,
format: 'es',
},
{
name: pkg.name,
file: pkg.main,
sourcemap: true,
exports: 'named',
format: 'cjs',
},
],
plugins: [
// @ts-ignore: this plugin has types for old version of jest :(
Expand Down
1 change: 0 additions & 1 deletion src/graphql/subgraph/vault/vaultQuery.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ query Vault($address: ID!) {
admin
isErc20
imageUrl
verified
capacity
mevEscrow
isPrivate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ type ModifyStakerActionsInput = {
const modifyStakerActions = (input: ModifyStakerActionsInput): ModifiedStakerActions => {
const { data, network } = input

return data.allocatorActions.map((item) => ({
return data?.allocatorActions.map((item) => ({
...item,
shares: formatEther(item.shares || 0),
assets: formatEther(item.assets || 0),
createdAt: Number(item.createdAt) * 1000,
link: `${configs[network].network.blockExplorerUrl}/tx/${item.id.replace(/-.*/, '')}`,
}))
})) || []
}


Expand Down
2 changes: 0 additions & 2 deletions src/methods/vault/requests/getVault/modifyVault.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ describe('modifyVault', () => {
const mockVaultQueryPayload: VaultQueryPayload = {
vault: {
isErc20: true,
verified: true,
feePercent: 200,
isPrivate: false,
performance: '10',
Expand Down Expand Up @@ -43,7 +42,6 @@ describe('modifyVault', () => {
apy: 365,
isErc20: true,
feePercent: 2,
verified: true,
performance: 10,
isPrivate: false,
capacity: '0.001',
Expand Down

0 comments on commit fa50194

Please sign in to comment.