File tree Expand file tree Collapse file tree
src/adaptors/spark-savings Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- export const sparkSavingsAbi = {
1+ const sparkSavingsAbi = {
22 totalAssets : {
33 inputs : [ ] ,
44 name : 'totalAssets' ,
@@ -20,4 +20,6 @@ export const sparkSavingsAbi = {
2020 stateMutability : 'view' ,
2121 type : 'function' ,
2222 } ,
23- } as const ;
23+ } ;
24+
25+ module . exports = { sparkSavingsAbi } ;
Original file line number Diff line number Diff line change 11const axios = require ( 'axios' )
22const sdk = require ( '@defillama/sdk' )
3+ const BigNumber = require ( 'bignumber.js' )
4+ const { sparkSavingsAbi} = require ( './abi.js' )
35
4- import { Pool } from '../../types/Pool'
5- import { sparkSavingsAbi } from './abi'
6- import { BigNumber } from 'bignumber.js'
6+ import type { Pool } from '../../types/Pool'
77
88const sparkBaseUrl = 'https://app.spark.fi/savings'
99
@@ -136,11 +136,10 @@ function rateToApy(rate: string): number {
136136}
137137
138138// high precision pow function for correct calculations
139- function pow ( a : BigNumber , b : number ) : BigNumber {
139+ function pow ( a : any , b : number ) : any {
140140 return BigNumber . clone ( { POW_PRECISION : 60 } ) . prototype . pow . apply ( a , [ b ] )
141141}
142142
143143module . exports = {
144- timetravel : false ,
145144 apy : getPools ,
146- }
145+ }
You can’t perform that action at this time.
0 commit comments