Skip to content

Commit 55002f4

Browse files
committed
fixes
1 parent 4a93f4c commit 55002f4

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

README.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,25 @@
1-
21
# CarbonPay
32

43
CarbonPay is Solana's first carbon-negative crypto wallet. It aims to mitigate transaction carbon footprint by employing eco-friendly practices and investing in carbon offset initiatives, contributing to a sustainable and environmentally conscious approach to digital finance
54

6-
75
## What's Broken?
86

97
- 80% of ReFi protocols don't have good marketing and lack users.
108
- Consumer focused offsetting can offset emissions 50 times faster than only business focused offsets.
11-
- Crypto can only become mainstream if there is enough positive impact
9+
- Crypto can only become mainstream if there is enough positive impact
1210

1311
## How CarbonPay solves it.
1412

1513
- Unified tooling:We're building a platform where every wallet can use or SDK to help create positive impact.
1614
- Helping protocols onboard users, CarbonPay integrates Dapps to easily allow them to transact and increase traffic to other Dapps from a single platform.
1715
- Incentivize offseting, we incentivize offsets with NFTs and real world impact such as planting trees.
1816

19-
20-
21-
22-
23-
2417
## Tech Stack
2518

2619
**App:** React-Native
2720

2821
**Contracts:** Rust
2922

30-
3123
## Screenshots
3224

3325
<table>
@@ -64,16 +56,12 @@ Install dependencies
6456
Launch the app on your Android device/emulator
6557

6658
`npx react-native run-android`
67-
6859

6960
## Authors
7061

7162
- [@sameer kashyap](https://www.github.com/Sameerkash)
7263
- [@sahil kakwani](https://www.github.com/Sahilkakwani9)
7364

65+
## Demo
7466

75-
## Deck
76-
77-
Insert link to demo
78-
79-
67+
- [Link to Demo](https://youtu.be/sKg_gE3anjE?si=8pd-LOn5424TSVkE)

components/bottomSheet/SendTransactionView.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ import {useTransactionStore} from '../../store/transaction_store';
1212

1313
export const SendTransaction = ({
1414
toggleNFTSheetView,
15+
address,
1516
}: {
1617
toggleNFTSheetView: () => void;
18+
address: string;
1719
}) => {
1820
const [amount, setAmount] = useState('');
19-
const [toAddress, setReceiverAddress] = useState('');
21+
const [toAddress, setReceiverAddress] = useState(address);
2022
const [automaticallyOffset, setAutomaticallyOffset] = useState(true);
2123

2224
const {solPriceUSD, sendTransaction} = useTransactionStore();
@@ -33,7 +35,7 @@ export const SendTransaction = ({
3335
toggleNFTSheetView();
3436

3537
sendTransaction({
36-
solAmount: BigInt(parseInt(amount)),
38+
solAmount: parseInt(amount, 10),
3739
toAddress: toAddress,
3840
});
3941
};

store/transaction_store.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ export const useTransactionStore = create<ITransactionStore>((set, get) => ({
7070
// console.log(transactions.length);
7171
},
7272

73-
sendTransaction: async ({toAddress, amount}: any) => {
73+
sendTransaction: async ({toAddress, solAmount}: any) => {
7474
let offsetAddress = '';
7575

7676
let tx = new Transaction();
7777
tx.add(
7878
SystemProgram.transfer({
7979
fromPubkey: get().publicKey!,
8080
toPubkey: toAddress,
81-
lamports: amount * LAMPORTS_PER_SOL,
81+
lamports: solAmount * LAMPORTS_PER_SOL,
8282
}),
8383
);
8484
let kp = Keypair.fromSecretKey(useStore.getState().privateKey!);
@@ -117,6 +117,6 @@ export type ITransactionStore = {
117117
solAmount,
118118
}: {
119119
toAddress: string;
120-
solAmount: BigInt;
120+
solAmount: number;
121121
}) => void;
122122
};

0 commit comments

Comments
 (0)