Skip to content

Commit

Permalink
add display balances for positions (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
bergarces authored Oct 5, 2023
1 parent 68a9a36 commit d6263f8
Show file tree
Hide file tree
Showing 61 changed files with 990 additions and 1,054 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This library is designed to simplify and standardize the process of fetching and

## Documentation 📖

Detailed documentation on the adapter methods can be found [here](./docs/interfaces/iProtocolAdapter.IProtocolAdapter.md).
Detailed documentation on the adapter methods can be found [here](./docs/interfaces/IProtocolAdapter.IProtocolAdapter.md).

## Portfolio dashboard

Expand Down
13 changes: 1 addition & 12 deletions docs/interfaces/adapter.BaseTokenMovement.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

### Properties

- [movementValue](adapter.BaseTokenMovement.md#movementvalue)
- [movementValueRaw](adapter.BaseTokenMovement.md#movementvalueraw)
- [address](adapter.BaseTokenMovement.md#address)
- [name](adapter.BaseTokenMovement.md#name)
Expand All @@ -23,23 +22,13 @@

## Properties

### movementValue

**movementValue**: `string`

#### Defined in

[adapter.ts:258](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L258)

___

### movementValueRaw

**movementValueRaw**: `bigint`

#### Defined in

[adapter.ts:259](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L259)
[adapter.ts:251](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L251)

___

Expand Down
52 changes: 4 additions & 48 deletions docs/interfaces/adapter.CalculationData.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@
### Properties

- [withdrawalsRaw](adapter.CalculationData.md#withdrawalsraw)
- [withdrawals](adapter.CalculationData.md#withdrawals)
- [depositsRaw](adapter.CalculationData.md#depositsraw)
- [deposits](adapter.CalculationData.md#deposits)
- [startPositionValueRaw](adapter.CalculationData.md#startpositionvalueraw)
- [startPositionValue](adapter.CalculationData.md#startpositionvalue)
- [endPositionValueRaw](adapter.CalculationData.md#endpositionvalueraw)
- [endPositionValue](adapter.CalculationData.md#endpositionvalue)

## Properties

Expand All @@ -25,17 +21,7 @@

#### Defined in

[adapter.ts:354](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L354)

___

### withdrawals

**withdrawals**: `string`

#### Defined in

[adapter.ts:355](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L355)
[adapter.ts:333](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L333)

___

Expand All @@ -45,17 +31,7 @@ ___

#### Defined in

[adapter.ts:356](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L356)

___

### deposits

**deposits**: `string`

#### Defined in

[adapter.ts:357](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L357)
[adapter.ts:334](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L334)

___

Expand All @@ -65,17 +41,7 @@ ___

#### Defined in

[adapter.ts:358](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L358)

___

### startPositionValue

**startPositionValue**: `string`

#### Defined in

[adapter.ts:359](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L359)
[adapter.ts:335](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L335)

___

Expand All @@ -85,14 +51,4 @@ ___

#### Defined in

[adapter.ts:360](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L360)

___

### endPositionValue

**endPositionValue**: `string`

#### Defined in

[adapter.ts:361](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L361)
[adapter.ts:336](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L336)
21 changes: 2 additions & 19 deletions docs/interfaces/adapter.ClaimableRewards.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Therefore they always have a underlying-token which is the reward token
### Properties

- [balanceRaw](adapter.ClaimableRewards.md#balanceraw)
- [balance](adapter.ClaimableRewards.md#balance)
- [type](adapter.ClaimableRewards.md#type)
- [tokens](adapter.ClaimableRewards.md#tokens)
- [address](adapter.ClaimableRewards.md#address)
Expand All @@ -44,29 +43,13 @@ User's balance raw

___

### balance

**balance**: `string`

User's balance formatted using token decimals

#### Inherited from

[TokenBalance](adapter.TokenBalance.md).[balance](adapter.TokenBalance.md#balance)

#### Defined in

[adapter.ts:192](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L192)

___

### type

**type**: ``"claimable"``

#### Defined in

[adapter.ts:224](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L224)
[adapter.ts:219](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L219)

___

Expand All @@ -76,7 +59,7 @@ ___

#### Defined in

[adapter.ts:225](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L225)
[adapter.ts:220](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L220)

___

Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/adapter.MovementsByBlock.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Movements in or out of a protocol position

#### Defined in

[adapter.ts:266](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L266)
[adapter.ts:258](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L258)

___

Expand All @@ -33,4 +33,4 @@ Blocknumber movement was executed

#### Defined in

[adapter.ts:271](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L271)
[adapter.ts:263](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L263)
4 changes: 2 additions & 2 deletions docs/interfaces/adapter.PositionProfits.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#### Defined in

[adapter.ts:349](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L349)
[adapter.ts:328](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L328)

___

Expand All @@ -39,7 +39,7 @@ ___

#### Defined in

[adapter.ts:350](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L350)
[adapter.ts:329](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L329)

___

Expand Down
6 changes: 3 additions & 3 deletions docs/interfaces/adapter.ProfitsWithRange.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Calculated profits from this block number

#### Defined in

[adapter.ts:317](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L317)
[adapter.ts:301](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L301)

___

Expand All @@ -34,7 +34,7 @@ Calculated profits to this block number

#### Defined in

[adapter.ts:322](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L322)
[adapter.ts:306](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L306)

___

Expand All @@ -46,4 +46,4 @@ Profits earned by user address

#### Defined in

[adapter.ts:326](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L326)
[adapter.ts:310](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L310)
6 changes: 3 additions & 3 deletions docs/interfaces/adapter.ProtocolAdapterParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#### Defined in

[adapter.ts:365](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L365)
[adapter.ts:340](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L340)

___

Expand All @@ -30,7 +30,7 @@ ___

#### Defined in

[adapter.ts:366](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L366)
[adapter.ts:341](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L341)

___

Expand All @@ -40,4 +40,4 @@ ___

#### Defined in

[adapter.ts:367](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L367)
[adapter.ts:342](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L342)
21 changes: 2 additions & 19 deletions docs/interfaces/adapter.ProtocolPosition.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ User's position, includes balance of protocol token related underlying token bal
### Properties

- [balanceRaw](adapter.ProtocolPosition.md#balanceraw)
- [balance](adapter.ProtocolPosition.md#balance)
- [type](adapter.ProtocolPosition.md#type)
- [tokens](adapter.ProtocolPosition.md#tokens)
- [address](adapter.ProtocolPosition.md#address)
Expand All @@ -43,29 +42,13 @@ User's balance raw

___

### balance

**balance**: `string`

User's balance formatted using token decimals

#### Inherited from

[TokenBalance](adapter.TokenBalance.md).[balance](adapter.TokenBalance.md#balance)

#### Defined in

[adapter.ts:192](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L192)

___

### type

**type**: ``"protocol"``

#### Defined in

[adapter.ts:232](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L232)
[adapter.ts:227](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L227)

___

Expand All @@ -77,7 +60,7 @@ Underlying token balances

#### Defined in

[adapter.ts:237](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L237)
[adapter.ts:232](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L232)

___

Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/adapter.ProtocolRewardPosition.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ User's position, includes balance of protocol token related underlying token bal

#### Defined in

[adapter.ts:210](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L210)
[adapter.ts:205](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L205)

___

Expand All @@ -43,7 +43,7 @@ Underlying token balances

#### Defined in

[adapter.ts:215](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L215)
[adapter.ts:210](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L210)

___

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/adapter.ProtocolTokenApr.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Current apr of protocol pool

#### Defined in

[adapter.ts:285](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L285)
[adapter.ts:277](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L277)

___

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/adapter.ProtocolTokenApy.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Current apy of protocol pool

#### Defined in

[adapter.ts:278](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L278)
[adapter.ts:270](https://github.com/consensys-vertical-apps/mmi-defi-adapters/blob/main/src/types/adapter.ts#L270)

___

Expand Down
Loading

0 comments on commit d6263f8

Please sign in to comment.