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

Resolve V2 merge conflicts #161

Merged
merged 40 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
be89942
Take min of pool balance or lender position for withdraw
mliu Nov 10, 2023
fa13511
Merge pull request #81 from 00labs/withdraw-lp-check
mliu Nov 13, 2023
db63d6b
Cherry pick subgraph service pool stats logic
mliu Nov 13, 2023
1a8e32d
Fix upScale for BigNumber
mliu Nov 13, 2023
a3d1570
Fix test
mliu Nov 13, 2023
347bf1c
Superfluid polygon supports (#68)
shan-57blocks Nov 14, 2023
a4c68cc
Add totalPoolAssets
mliu Nov 15, 2023
ff56ca0
Merge branch 'develop' into subgraph-poolstats
mliu Nov 15, 2023
a6fe4a6
Merge pull request #83 from 00labs/subgraph-poolstats
mliu Nov 15, 2023
50e88d1
Fix upscale for overflow
mliu Nov 21, 2023
8485c51
Add test
mliu Nov 21, 2023
89c34c5
Merge pull request #85 from 00labs/fix-upscale
mliu Nov 21, 2023
13746d4
Add raincards test pool
mliu Nov 27, 2023
bf4c73d
Merge pull request #90 from 00labs/raincards-test-poll
mliu Nov 27, 2023
4bf85a2
Fix dep conflict
mliu Dec 1, 2023
b9c113c
Merge pull request #96 from 00labs/fix-dep-conflict
mliu Dec 1, 2023
67f1d3a
Merge pull request #84 from 00labs/develop
mliu Dec 1, 2023
bc18266
v0.0.48
Dec 1, 2023
f820228
Auto-merge master back to develop
Dec 1, 2023
5371f00
Raincards pool
mliu Dec 7, 2023
ed7dcfa
Merge pull request #100 from 00labs/raincards
mliu Dec 7, 2023
9afd91c
Jia Celo
mliu Dec 11, 2023
6d31246
Merge pull request #102 from 00labs/jia-celo
mliu Dec 11, 2023
9efd6f7
Quipu Pool
mliu Jan 18, 2024
52f152c
Merge pull request #127 from 00labs/quipu
mliu Jan 18, 2024
c20a837
Merge pull request #128 from 00labs/develop
mliu Jan 18, 2024
1f0db95
v0.0.49
Jan 18, 2024
22bf05f
Auto-merge master back to develop
Jan 18, 2024
c507db2
added Arf and Jia USDC pools in SDK
PlayJok3r Feb 22, 2024
c0e3cde
added description change
PlayJok3r Feb 22, 2024
371cc73
updated icons to be USDc
PlayJok3r Feb 23, 2024
bb4efdf
Merge pull request #150 from 00labs/celo-usdc-pools
PlayJok3r Feb 23, 2024
48388d0
Merge pull request #152 from 00labs/develop
PlayJok3r Feb 24, 2024
60c4438
v0.0.50
Feb 24, 2024
30b348f
Auto-merge master back to develop
Feb 24, 2024
f50466a
Hide Arf USDC pool
mliu Feb 26, 2024
b04468d
Merge pull request #154 from 00labs/hide-arf-usdc
mliu Feb 26, 2024
06b1431
Merge branch 'develop' into v2
mliu Mar 13, 2024
a0e7bfb
Delete old pools
mliu Mar 13, 2024
62996f6
Merge pull request #160 from 00labs/delete-old-pools
mliu Mar 14, 2024
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
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"version": "0.0.47"
"version": "0.0.50"
}
4 changes: 2 additions & 2 deletions packages/huma-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@huma-finance/sdk",
"version": "0.0.47",
"version": "0.0.50",
"types": "./dist/index.d.ts",
"main": "./dist/cjs/index.js",
"module": "./dist/index.js",
Expand Down Expand Up @@ -28,7 +28,7 @@
"@ethersproject/constants": "^5.7.0",
"@ethersproject/contracts": "^5.7.0",
"@ethersproject/providers": "^5.6.0",
"@huma-finance/shared": "^0.0.47",
"@huma-finance/shared": "^0.0.50",
"axios": "^1.4.0",
"bignumber.js": "^9.1.1",
"ethers": "^5.7.2",
Expand Down
19 changes: 10 additions & 9 deletions packages/huma-sdk/src/services/SubgraphService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ function getRWReceivableInfo(

type PoolStats = {
id: string
totalPoolAssets: number
amountCreditOriginated: number
amountCreditRepaid: number
amountCreditDefaulted: number
Expand All @@ -227,15 +228,15 @@ function getPoolStats(
}

const PoolStatsQuery = `
query {
poolStat(id:"${pool?.toLowerCase()}") {
id
amountCreditOriginated
amountCreditRepaid
amountCreditDefaulted
}
}
`
query {
poolStat(id:"${pool?.toLowerCase()}") {
id
amountCreditOriginated
amountCreditRepaid
amountCreditDefaulted
totalPoolAssets
}
}`

return requestPost<{
errors?: unknown
Expand Down
4 changes: 2 additions & 2 deletions packages/huma-shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@huma-finance/shared",
"version": "0.0.47",
"version": "0.0.50",
"types": "./dist/index.d.ts",
"main": "./dist/cjs/index.js",
"module": "./dist/index.js",
Expand Down Expand Up @@ -39,7 +39,7 @@
"@mui/system": "^5.0.6",
"@mui/x-date-pickers": "^5.0.7",
"@reduxjs/toolkit": "^1.8.6",
"@requestnetwork/multi-format": "^0.15.10",
"@requestnetwork/multi-format": "0.15.10",
"@types/utf8": "^3.0.1",
"@walletconnect/ethereum-provider": "1.8.0",
"@walletconnect/jsonrpc-http-connection": "^1.0.3",
Expand Down
6 changes: 4 additions & 2 deletions packages/huma-shared/src/utils/number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,15 @@ export const downScale = <T = string>(
}

export const upScale = <T = string>(
num: string | number,
num: string | number | BigNumber,
decimals?: number,
): T => {
if (isEmpty(num) || isEmpty(decimals)) {
return num as T
}
const result = Number(num) * 10 ** decimals!
const result = BigNumber.isBigNumber(num)
? num.mul(BigNumber.from(10).pow(decimals!))
: Number(num) * 10 ** decimals!
if (typeof num === 'string') {
return String(result) as T
}
Expand Down
Loading
Loading