File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export function loadEnv(): Partial<ContribkitConfig> {
3131 afdian : {
3232 userId : process . env . CONTRIBKIT_AFDIAN_USER_ID || process . env . AFDIAN_USER_ID ,
3333 token : process . env . CONTRIBKIT_AFDIAN_TOKEN || process . env . AFDIAN_TOKEN ,
34- exechangeRate : Number . parseFloat ( process . env . CONTRIBKIT_AFDIAN_EXECHANGERATE || process . env . AFDIAN_EXECHANGERATE || '0' ) || undefined ,
34+ exchangeRate : Number . parseFloat ( process . env . CONTRIBKIT_AFDIAN_EXCHANGE_RATE || process . env . AFDIAN_EXCHANGE_RATE || '0' ) || undefined ,
3535 } ,
3636 polar : {
3737 token : process . env . CONTRIBKIT_POLAR_TOKEN || process . env . POLAR_TOKEN ,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export async function fetchAfdianSponsors(options: ContribkitConfig['afdian'] =
1515 const {
1616 userId,
1717 token,
18- exechangeRate = 6.5 ,
18+ exchangeRate = 6.5 ,
1919 includePurchases = true ,
2020 purchaseEffectivity = 30 ,
2121 } = options
@@ -88,7 +88,7 @@ export async function fetchAfdianSponsors(options: ContribkitConfig['afdian'] =
8888 // all_sum_amount is based on cny
8989 monthlyDollars : isExpired
9090 ? - 1
91- : Number . parseFloat ( raw . all_sum_amount ) / exechangeRate ,
91+ : Number . parseFloat ( raw . current_plan . show_price ) / exchangeRate ,
9292 privacyLevel : 'PUBLIC' ,
9393 tierName : 'Afdian' ,
9494 createdAt : new Date ( raw . first_pay_time * 1000 ) . toISOString ( ) ,
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ export interface ProvidersConfig {
170170 *
171171 * @default 6.5
172172 */
173- exechangeRate ?: number
173+ exchangeRate ?: number
174174 /**
175175 * Include one-time purchases
176176 * @default true
You can’t perform that action at this time.
0 commit comments