Skip to content

Commit

Permalink
version 3.1.7 (#183)
Browse files Browse the repository at this point in the history
* fix merging issues

* @celo/react-celo

* 3.0.7

* downgrade deps versions

* add total amount and tranche amount

* 3.1.1

* 3.1.2 + bump dependencies

* fix missing update isReady

* fix update state + default nextclaim to zero

* fix add community proposals
  • Loading branch information
Bernardo Vieira authored Dec 9, 2022
1 parent 45c30bc commit f08be76
Show file tree
Hide file tree
Showing 14 changed files with 1,282 additions and 1,375 deletions.
File renamed without changes.
11 changes: 5 additions & 6 deletions example-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"@impact-market/utils": "link:..",
"@celo/contractkit": "2.2.0",
"@celo/react-celo": "4.2.1"
"@celo/contractkit": "2.3.0",
"@celo/react-celo": "4.2.1",
"@celo/utils": "2.3.0",
"@walletconnect/client": "1.8.0",
"web3": "1.3.6"
},
"devDependencies": {
"@types/node": "18.8.5",
Expand All @@ -23,9 +26,5 @@
"eslint": "8.25.0",
"eslint-config-next": "12.3.1",
"typescript": "4.8.4"
},
"resolutions": {
"@celo/contractkit": "2.2.0",
"@celo/react-celo": "4.2.1"
}
}
67 changes: 65 additions & 2 deletions example-web/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,80 @@
import '@celo/react-celo/lib/styles.css';
import type { AppProps } from 'next/app';
import { Alfajores, CeloProvider } from '@celo/react-celo';
import { Alfajores, CeloProvider, SupportedProviders } from '@celo/react-celo';

function MyApp({ Component, pageProps }: AppProps) {
return (
<CeloProvider
network={Alfajores}
defaultNetwork={Alfajores.name}
dapp={{
name: 'My awesome dApp',
description: 'My awesome description',
url: 'https://example.com',
icon: ''
}}
connectModal={{
providersOptions: {
searchable: true,
additionalWCWallets: [
// see https://github.com/WalletConnect/walletconnect-registry/#schema for a schema example
{
app: {
android: 'https://play.google.com/store/apps/details?id=com.impactmarket.mobile',
browser: '',
ios: 'https://apps.apple.com/app/impactmarket/id1530870911',
linux: '',
mac: '',
windows: ''
},
chains: ['eip:42220'],
description: 'Your future unlocked.',
desktop: {
native: 'libera://',
universal: 'libera://'
},
homepage: 'https://impactmarket.com/',
id: 'libera-wallet',
logos: {
lg: 'https://dxdwf61ltxjyn.cloudfront.net/eyJidWNrZXQiOiJpbXBhY3RtYXJrZXQtYXBwIiwia2V5IjoiTGliZXJhTG9nby5qcGciLCJlZGl0cyI6eyJyZXNpemUiOnsid2lkdGgiOjQwMCwiaGVpZ2h0Ijo0MDAsImZpdCI6Imluc2lkZSJ9fSwib3V0cHV0Rm9ybWF0IjoianBnIn0=',
md: 'https://dxdwf61ltxjyn.cloudfront.net/eyJidWNrZXQiOiJpbXBhY3RtYXJrZXQtYXBwIiwia2V5IjoiTGliZXJhTG9nby5qcGciLCJlZGl0cyI6eyJyZXNpemUiOnsid2lkdGgiOjQwMCwiaGVpZ2h0Ijo0MDAsImZpdCI6Imluc2lkZSJ9fSwib3V0cHV0Rm9ybWF0IjoianBnIn0=',
sm: 'https://dxdwf61ltxjyn.cloudfront.net/eyJidWNrZXQiOiJpbXBhY3RtYXJrZXQtYXBwIiwia2V5IjoiTGliZXJhTG9nby5qcGciLCJlZGl0cyI6eyJyZXNpemUiOnsid2lkdGgiOjQwMCwiaGVpZ2h0Ijo0MDAsImZpdCI6Imluc2lkZSJ9fSwib3V0cHV0Rm9ybWF0IjoianBnIn0='
},
metadata: {
colors: {
primary: '#fff',
secondary: '#2E6AFF'
},
shortName: 'Libera'
},
mobile: {
native: 'libera://',
universal: 'libera://'
},
name: 'Libera',
responsive: {
browserFriendly: false,
browserOnly: false,
mobileFriendly: true,
mobileOnly: true
},
// IMPORTANT
// This is the version of WC. We only support version 1 at the moment.
versions: ['1']
}
],
// This option hides specific wallets from the default list
hideFromDefaults: [
SupportedProviders.PrivateKey,
SupportedProviders.CeloTerminal,
SupportedProviders.CeloWallet,
SupportedProviders.CeloDance,
SupportedProviders.Injected,
SupportedProviders.Ledger,
SupportedProviders.Steakwallet,
SupportedProviders.CoinbaseWallet
]
}
}}
>
<Component {...pageProps} />
</CeloProvider>
Expand Down
5 changes: 4 additions & 1 deletion example-web/pages/components/Airdrop/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useAirdropRecurring } from '@impact-market/utils/useAirdropRecurring';
import WalletConnection from '../WalletConnection';

const Airdrop = () => {
const { claim, amountClaimed, nextClaim } = useAirdropRecurring('0xEb0b7fE19c764224e4a6572CC0EA80074489896E');
const { claim, amountClaimed, nextClaim, isReady, totalAmount, trancheAmount } = useAirdropRecurring('0xEb0b7fE19c764224e4a6572CC0EA80074489896E');

console.log('1');
const handleClaim = () =>
Expand All @@ -15,6 +15,9 @@ const Airdrop = () => {
return (
<WalletConnection title="Claim">
<div>Amount claimed {amountClaimed}</div>
<div>totalAmount {totalAmount}</div>
<div>trancheAmount {trancheAmount}</div>
<div>isReady {isReady}</div>
<div>Next claim {nextClaim.toString()}</div>
<button onClick={handleClaim}>claim</button>
</WalletConnection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { frequencyToText } from '@impact-market/utils/frequencyToText';
import { toToken } from '@impact-market/utils/toToken';
import { useImpactMarketCouncil } from '@impact-market/utils/useImpactMarketCouncil';
import React, { useEffect, useState } from 'react';
import { impactMarket } from '../../services/impactMarket';
import { impactMarket } from '../../../services/impactMarket';

const Community = (props: any) => {
const { id, name, description, contract, requestByAddress, ambassadorAddress } = props;
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions example-web/pages/components/ImpactMarketCouncil/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import WalletConnection from '../WalletConnection';
import AddCommunity from './AddCommunity';
import BuildingOperationsBlocks from './BuildingOperationBlocks';
import ListProposals from './ListProposals';

const DaoHooks = () => {
Expand All @@ -11,7 +10,6 @@ const DaoHooks = () => {
<li style={{ marginTop: 16 }}>
<AddCommunity />
<ListProposals />
<BuildingOperationsBlocks />
</li>
</ul>
</WalletConnection>
Expand Down
File renamed without changes.
Loading

0 comments on commit f08be76

Please sign in to comment.