forked from project-serum/oyster-swap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5350bc1
commit 2c09911
Showing
49 changed files
with
2,706 additions
and
2,079 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
## ⚠️ Warning | ||
|
||
Any content produced by Solana, or developer resources that Solana provides, are for educational and inspiration purposes only. Solana does not encourage, induce or sanction the deployment of any such applications in violation of applicable laws or regulations. | ||
Any content produced by Solana, or developer resources that Solana provides, are for educational and inspiration purposes only. Solana does not encourage, induce or sanction the deployment of any such applications in violation of applicable laws or regulations. | ||
|
||
## Deployment | ||
|
||
App is using to enviroment variables that can be set before deployment: | ||
* `SWAP_PROGRAM_OWNER_FEE_ADDRESS` used to distribute fees to owner of the pool program (Note: this varibale reuqires special version of token-swap program) | ||
* `SWAP_HOST_FEE_ADDRESS` used to distribute fees to host of the application | ||
|
||
- `SWAP_PROGRAM_OWNER_FEE_ADDRESS` used to distribute fees to owner of the pool program (Note: this varibale reuqires special version of token-swap program) | ||
- `SWAP_HOST_FEE_ADDRESS` used to distribute fees to host of the application | ||
|
||
To inject varibles to the app, set the SWAP_PROGRAM_OWNER_FEE_ADDRESS and/or SWAP_HOST_FEE_ADDRESS environment variables to the addresses of your SOL accounts. | ||
|
||
You may want to put these in local environment files (e.g. .env.development.local, .env.production.local). See the documentation on environment variables for more information. | ||
|
||
NOTE: remember to re-build your app before deploying for your referral addresses to be reflected. | ||
NOTE: remember to re-build your app before deploying for your referral addresses to be reflected. |
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@import '~antd/dist/antd.css'; | ||
@import '~antd/dist/antd.dark.less'; | ||
@import "~antd/dist/antd.css"; | ||
@import "~antd/dist/antd.dark.less"; | ||
@primary-color: #ff00a8; | ||
@popover-background: #1a2029; | ||
@popover-background: #1a2029; |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
declare module 'buffer-layout' { | ||
const magic: any; | ||
export = magic; | ||
declare module "buffer-layout" { | ||
const magic: any; | ||
export = magic; | ||
} | ||
|
||
declare module 'jazzicon' { | ||
const magic: any; | ||
export = magic; | ||
} | ||
declare module "jazzicon" { | ||
const magic: any; | ||
export = magic; | ||
} |
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 |
---|---|---|
@@ -1,23 +1,30 @@ | ||
import React from 'react'; | ||
import { useWallet } from './../utils/wallet'; | ||
import { shortenAddress } from './../utils/utils'; | ||
import { Identicon } from './identicon'; | ||
import { useNativeAccount } from './../utils/accounts'; | ||
import { LAMPORTS_PER_SOL } from '@solana/web3.js'; | ||
import React from "react"; | ||
import { useWallet } from "./../utils/wallet"; | ||
import { shortenAddress } from "./../utils/utils"; | ||
import { Identicon } from "./identicon"; | ||
import { useNativeAccount } from "./../utils/accounts"; | ||
import { LAMPORTS_PER_SOL } from "@solana/web3.js"; | ||
|
||
export const AccountInfo = (props: {}) => { | ||
const { wallet } = useWallet(); | ||
const { account } = useNativeAccount(); | ||
|
||
if (!wallet || !wallet.publicKey) { | ||
return null; | ||
} | ||
|
||
return <div className="wallet-wrapper"> | ||
<span>{((account?.lamports || 0) / LAMPORTS_PER_SOL).toFixed(2)} SOL</span> | ||
const { wallet } = useWallet(); | ||
const { account } = useNativeAccount(); | ||
|
||
if (!wallet || !wallet.publicKey) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<div className="wallet-wrapper"> | ||
<span> | ||
{((account?.lamports || 0) / LAMPORTS_PER_SOL).toFixed(2)} SOL | ||
</span> | ||
<div className="wallet-key"> | ||
{shortenAddress(`${wallet.publicKey}`)} | ||
<Identicon address={wallet.publicKey.toBase58()} style={{ marginLeft: '0.5rem' }} /> | ||
<Identicon | ||
address={wallet.publicKey.toBase58()} | ||
style={{ marginLeft: "0.5rem" }} | ||
/> | ||
</div> | ||
</div>; | ||
} | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.