From 21b59bb953cb8f02dea8954abcd7848e9d90bf20 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 5 Jul 2023 11:23:16 -0700 Subject: [PATCH] rename stripe_api_key to stripe_whsec_key --- .env | 1 - web3_proxy/src/config.rs | 4 ++-- web3_proxy/src/frontend/users/payment_stripe.rs | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.env b/.env index c0b01f45..e9f9714b 100644 --- a/.env +++ b/.env @@ -1,2 +1 @@ DATABASE_URL=mysql://root:dev_web3_proxy@127.0.0.1:13306/dev_web3_proxy -STRIPE_API_KEY= \ No newline at end of file diff --git a/web3_proxy/src/config.rs b/web3_proxy/src/config.rs index 1f51f881..d7bc1be4 100644 --- a/web3_proxy/src/config.rs +++ b/web3_proxy/src/config.rs @@ -168,8 +168,8 @@ pub struct AppConfig { /// Optionally send errors to pub sentry_url: Option, - /// Stripe api key from environment variable, - pub stripe_api_key: Option, + /// Stripe api key for checking validity of webhooks + pub stripe_whsec_key: Option, /// Track rate limits in a redis (or compatible backend) /// It is okay if this data is lost. diff --git a/web3_proxy/src/frontend/users/payment_stripe.rs b/web3_proxy/src/frontend/users/payment_stripe.rs index ad699efb..7ee3a91d 100644 --- a/web3_proxy/src/frontend/users/payment_stripe.rs +++ b/web3_proxy/src/frontend/users/payment_stripe.rs @@ -87,7 +87,7 @@ pub async fn user_balance_stripe_post( let secret = app .config - .stripe_api_key + .stripe_whsec_key .clone() .web3_context("Stripe API key not found in config!")?;