This repository has been archived by the owner on Jan 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* removed payment helius * better backend helius connection * process.env in test
- Loading branch information
1 parent
9755e08
commit 285e4f5
Showing
11 changed files
with
54 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 2 additions & 8 deletions
10
apps/backend-serverless/src/services/fetch-transaction.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
apps/backend-serverless/src/utilities/connection.utility.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Connection } from '@solana/web3.js'; | ||
import { MissingEnvError } from '../errors/missing-env.error.js'; | ||
|
||
export const getConnection = () => { | ||
const heliusApiKey = process.env.HELIUS_API_KEY; | ||
if (heliusApiKey == null) { | ||
throw new MissingEnvError('helius api'); | ||
} | ||
|
||
return new Connection(`https://rpc.helius.xyz/?api-key=${heliusApiKey}`); | ||
}; | ||
|
||
export const getConnectionUrl = () => { | ||
const heliusApiKey = process.env.HELIUS_API_KEY; | ||
if (heliusApiKey == null) { | ||
throw new MissingEnvError('helius api'); | ||
} | ||
|
||
return `https://rpc.helius.xyz/?api-key=${heliusApiKey}`; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
285e4f5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
shopifydocs-solana-pay – ./apps/docs
shopifydocs-solana-pay-git-main-solana-labs.vercel.app
shopifydocs-solana-pay.vercel.app
shopifydocs-solana-pay-solana-labs.vercel.app
shopifydocs.solanapay.com
commercedocs.solanapay.com