Skip to content

Commit

Permalink
Merge pull request #156 from layerbankgoldsky/layerbank
Browse files Browse the repository at this point in the history
fix: lowercase for weth handling instead of zero address
  • Loading branch information
0xroll authored May 23, 2024
2 parents 3373cd3 + 712d296 commit 220aa85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion adapters/layerbank/src/sdk/marketDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const getMarketInfos = async (
.map((v) => v.result as `0x${string}`)
.map((m) => {
if (m === "0x0000000000000000000000000000000000000000") {
return "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f";
return "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f".toLowerCase();
} else {
return m.toLowerCase();
}
Expand Down
7 changes: 6 additions & 1 deletion adapters/layerbank/src/sdk/subgraphDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ export const getAccountStatesForAddressByPoolAtBlock = async (
.map((m: any) => ({
id: m.id.toLowerCase(),
account: m.account.toLowerCase(),
token: marketsToUnderlying[m.token].toLowerCase(),
token:
marketsToUnderlying[
m.token === zeroAddress
? "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f".toLowerCase()
: m.token
].toLowerCase(),
lentAmount: BigInt(m.supplied),
borrowAmount: BigInt(m.borrowed),
}));
Expand Down

0 comments on commit 220aa85

Please sign in to comment.