Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix search #56

Open
wants to merge 106 commits into
base: fix_search
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
4db376f
Merge pull request #33 from yann300/fix_search
yann300 Sep 12, 2022
0e8f1bd
fix wrong contractRef used for minting
joeizang Sep 14, 2022
1d97aec
remove redundant useReducer call and reducer function
joeizang Sep 14, 2022
f7db94b
Merge pull request #38 from yann300/joeizang-patch-3
yann300 Sep 14, 2022
c97d4af
fix copy icon disappearance. Add shadow and animation to NFT cards
joeizang Sep 14, 2022
5a23a73
fix redundant contract creation. fix minor redundancies in code
joeizang Sep 14, 2022
5e83b05
adjust shadows.
joeizang Sep 15, 2022
242bc90
justify left
joeizang Sep 15, 2022
7a7ff79
remove redundant console log
joeizang Sep 15, 2022
b4d30ad
fix ens search bug
joeizang Sep 15, 2022
b1d0917
remove redundant submitHandler function
joeizang Sep 15, 2022
dc1fe94
fix buggy spinner when badges are not found
joeizang Sep 15, 2022
05610d2
use Skeleton instead of spinners while images load
joeizang Sep 16, 2022
a246fbb
fix conditional load more button display
joeizang Sep 16, 2022
ca8bf0f
fix load more button displaying
joeizang Sep 22, 2022
d9acdbb
finish fixing load more button displaying
joeizang Sep 22, 2022
d30b0db
fix footer to reflect main site
joeizang Sep 22, 2022
7bf9ca3
fix styling for footer icons
joeizang Sep 23, 2022
76b6b23
Merge pull request #37 from yann300/joeizang-patch-2
yann300 Sep 26, 2022
90e9d56
remove duplicate contract initialization in BrowseBadges
joeizang Nov 8, 2022
b6d0f84
fix key prop error. minor browsebadges refactor
joeizang Nov 9, 2022
745cac0
fix styling on AddressedCard Component. Comment out implementation. N…
joeizang Nov 10, 2022
03161bb
generate eventBadges array with all desired properties
joeizang Nov 11, 2022
c0b616e
working on presenting nft groups
joeizang Nov 13, 2022
a4e21d8
revert some changes
joeizang Nov 14, 2022
13913f8
create rewardGroup component to hold groups of rewards
joeizang Nov 14, 2022
8397aa6
fix group card display. add basic accordion
joeizang Nov 14, 2022
a1ad840
change grouping criterium to payload
joeizang Nov 15, 2022
5a91b39
resolve ens names cleanly
joeizang Nov 16, 2022
6a3e3f7
removed commented out code
joeizang Nov 16, 2022
0f3852b
add view transaction buttons to owner addresses
joeizang Nov 16, 2022
1fa66d8
clean up
joeizang Nov 16, 2022
cdb280e
change grouping determinant to tokenType and payload
joeizang Nov 16, 2022
701d0e3
clean up
joeizang Nov 16, 2022
01a63a1
remove unnecessary conditional check
joeizang Nov 16, 2022
8a47e79
clean up App.jsx
joeizang Nov 16, 2022
9be5be2
cleanup BrowseBadges.jsx
joeizang Nov 16, 2022
8755a63
removed unused state property in RewardGroupCard.jsx
joeizang Nov 16, 2022
ff2f77b
renamed variable for unwrapped items
joeizang Nov 16, 2022
f9e0b5a
refactor and remove needless nested loop in BrowseBadges.jsx
joeizang Nov 16, 2022
a1357f0
Merge pull request #41 from yann300/group-badges
yann300 Nov 16, 2022
619fbe4
add custom button to accordion
joeizang Nov 28, 2022
7217491
fix types for Accounts.tsx
joeizang Nov 28, 2022
a1996c1
fixing more types
joeizang Nov 28, 2022
e1b6482
fix more type errors
joeizang Nov 28, 2022
28c649f
fix types in other components
joeizang Nov 28, 2022
868c80e
fix more type errors
joeizang Nov 28, 2022
b4b6c67
finish converting app to typescript
joeizang Nov 28, 2022
d4cf49d
add updates to yarn lock and package json
joeizang Nov 28, 2022
be384ff
fix Remixer nft card height
joeizang Nov 29, 2022
870abed
fix typing in NftCard component
joeizang Nov 29, 2022
99d0d92
apply comments from @yann300
joeizang Dec 1, 2022
147f7e7
address comments from @vermouth22
joeizang Dec 1, 2022
2d7d976
fix spacing in accordion items
joeizang Dec 1, 2022
303b812
fix border radius of accordion
joeizang Dec 1, 2022
ce203b1
Merge pull request #44 from yann300/group-ui-improv
yann300 Dec 2, 2022
3dac616
cleanup
joeizang Dec 7, 2022
75bcb32
add skeleton of about page
joeizang Dec 7, 2022
f5ab262
working on about page styling
joeizang Dec 8, 2022
cbf628c
remove unwanted artifacts
joeizang Dec 8, 2022
8176986
cleanup
joeizang Dec 7, 2022
0205874
just add random text
joeizang Dec 8, 2022
16f2210
Merge branch 'about-rewards-page' of github.com:yann300/remix-rewards…
joeizang Dec 8, 2022
17952d1
add prop types for infocard. add heading and variant
joeizang Dec 8, 2022
83a9363
center infocards. style heading properly.
joeizang Dec 12, 2022
5d5a338
fix styling of infocards. Add abstractions
joeizang Dec 13, 2022
1df51f0
add prop type for more rewards component.
joeizang Dec 14, 2022
1f9602c
add key components to more rewards component
joeizang Dec 14, 2022
4d81f10
rework typing for badges
joeizang Dec 14, 2022
60fdf68
undo redundant provider use
joeizang Dec 18, 2022
d3b0ff1
fix misspelling
joeizang Dec 20, 2022
e4ea231
add review comments recommended by @vermouth22
joeizang Dec 28, 2022
93ee756
Merge pull request #47 from yann300/about-rewards-page
joeizang Dec 28, 2022
2e83950
add scroll to accordion
joeizang Jan 11, 2023
d345fd8
add pacakge. refactor rewardGroup component
joeizang Feb 3, 2023
cf4b3f9
remove package.
joeizang Feb 3, 2023
0bcfd93
remove redundant packge-lock.json. update packages
joeizang Feb 3, 2023
c932985
finish group scroll
joeizang Feb 3, 2023
e56b3d2
fix padding in card grouping
joeizang Feb 6, 2023
1f8f17d
change scrollbar color. fix scrollbar width
joeizang Feb 6, 2023
686d76b
Merge pull request #49 from yann300/accordion-ui-fix
joeizang Feb 7, 2023
572e39a
Update BrowseBadges.tsx
vermouth22 Aug 3, 2023
b63dfd5
Update MintingPage.tsx
vermouth22 Aug 3, 2023
eb3d74b
Merge pull request #52 from yann300/vermouth22-patch-2
joeizang Aug 3, 2023
6abfaca
Merge pull request #51 from yann300/vermouth22-patch-1
joeizang Aug 3, 2023
75c83f5
fix ipfs endpoint
yann300 Aug 14, 2023
746f46f
Merge pull request #53 from yann300/fix_ipfs_endpoin
yann300 Aug 14, 2023
d194920
scroll
yann300 Feb 23, 2024
61f3f61
Merge pull request #1 from remix-project-org/scroll
yann300 Feb 23, 2024
b98cb12
fix build && add scroll
yann300 Feb 23, 2024
c842919
scroll
yann300 Feb 24, 2024
c8273c7
various fixes
yann300 Feb 25, 2024
1aeb5bb
Merge pull request #2 from remix-project-org/scroll
yann300 Feb 26, 2024
42b3762
update scroll endpoint
yann300 Oct 26, 2024
17310d6
fix build
yann300 Jan 30, 2025
1b04440
remove resolvinh ENS
yann300 Jan 30, 2025
af4bac8
add Lisk
yann300 Jan 30, 2025
7f02ae1
add Lisk switch
yann300 Jan 30, 2025
ddf3271
fix using cache
yann300 Feb 3, 2025
4da862b
comment List
yann300 Feb 3, 2025
959d2ad
Merge pull request #3 from remix-project-org/Lisk
yann300 Feb 3, 2025
c3a9417
fix cache
yann300 Feb 3, 2025
3f2a1c2
Merge pull request #4 from remix-project-org/Lisk
yann300 Feb 3, 2025
853e695
Create funding.json
yann300 Feb 11, 2025
83cd6b3
Merge pull request #5 from remix-project-org/yann300-patch-1
yann300 Feb 11, 2025
9e0bc83
fix search and fix Scroll searching
yann300 Feb 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
various fixes
yann300 committed Feb 25, 2024
commit c8273c78921aaf35e46d077d2f9f8eafa580f27a
4 changes: 2 additions & 2 deletions packages/react-app/src/components/Account.tsx
Original file line number Diff line number Diff line change
@@ -189,7 +189,7 @@ export default function Account({ minimized }: AccountsProps) {
const chainInfo = await getCurrentChainId()
const { chainId } = chainInfo[0]
console.log({ chainId })
if (chainId !== selectedChainId) {
if (chainId !== 5 && chainId !== 534352) {
setShowWrongNetworkToast(true)
await switchNetworkChain(selectedChainId)
accounts = await (window.ethereum as any).request({
@@ -199,7 +199,7 @@ export default function Account({ minimized }: AccountsProps) {
setNetInfo(chainInfo)
return
}
if (chainId === selectedChainId) {
if (chainId !== 5 || chainId !== 534352) {
accounts = await (window.ethereum as any).request({
method: 'eth_requestAccounts',
})
2 changes: 1 addition & 1 deletion packages/react-app/src/components/AddressedCard.tsx
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ export default function AddressedCard({ badges, etherscanRef }: { badges: any[],
<>
{badges && badges.length > 0 ? (
badges.map(badge => {
const src = badge.fileName // 'https://ipfs.io/ipfs/' + badge.decodedIpfsHash
const src = 'https://ipfs-cluster.ethdevops.io/ipfs/' + badge.decodedIpfsHash // badge.fileName // 'https://ipfs.io/ipfs/' + badge.decodedIpfsHash
const txLink = etherscanRef + badge.transactionHash
return (
<Box
2 changes: 1 addition & 1 deletion packages/react-app/src/components/NftCard.tsx
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ export default function NftCard(props: NftCardProps) {
const name = await getEnsName(toFormatted)
let title = name ? name : toFormatted

const src = data.image || '' // 'https://ipfs.io/ipfs/' + toBase58(data.hash)
const src = 'https://ipfs-cluster.ethdevops.io/ipfs/' + toBase58(data.hash) // data.image || '' // 'https://ipfs.io/ipfs/' + toBase58(data.hash)
const txLink = etherscan + transactionHash
setState({ data, title, src, txLink })
} catch (error) {
2 changes: 1 addition & 1 deletion packages/react-app/src/components/RewardGroupCard.tsx
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ export default function RewardGroupCard(props: any) {
const title = props.event[0].tokenType
const tokenType = props.event[0].tokenType
const payload = props.event[0].payload
const src = props.event[0].fileName || 'https://ipfs.io/ipfs/' + toBase58(props.event[0].hash)
const src = 'https://ipfs-cluster.ethdevops.io/ipfs/' + toBase58(props.event[0].hash) // props.event[0].fileName || 'https://ipfs.io/ipfs/' + toBase58(props.event[0].hash)

const rewardCount = props.event.length
setState({ title, src, rewardCount, tokenType, payload })
18 changes: 3 additions & 15 deletions packages/react-app/src/helpers/getTokenData.js
Original file line number Diff line number Diff line change
@@ -11,31 +11,19 @@ const chainsAddresses = {

const cache = {}

let globalCache

export async function getTokenData(chainId, id) {
id = parseInt(id)
if (!globalCache) {
globalCache = await fetch(`https://remix-reward-api.vercel.app/cache`)
globalCache = await globalCache.json()
}

let result
let result
if (cache[chainId + ' ' + id]) {
result = cache[chainId + ' ' + id]
}

const chainName = chains[chainId]
const address = chainsAddresses[chainName]
if (!result && globalCache[address + '_' + id]) {
result = globalCache[address + '_' + id]
console.log('using server cache')
}

if (!result) {
try {
console.log('getTokenData', result)
console.log('getTokenData', id)
result = await fetch(`https://remix-reward-api.vercel.app/api-${chains[chainId]}/${id}`)
console.log('getTokenData response', id)
result = await result.json()
cache[chainId + ' ' + id] = result
} catch (e) {
14 changes: 8 additions & 6 deletions packages/react-app/src/views/BrowseBadges.tsx
Original file line number Diff line number Diff line change
@@ -67,10 +67,12 @@ export default function BrowseBadges() {
providerRef = externalContracts[selectedChainId].provider
etherscanRef = externalContracts[selectedChainId].etherscan
}
const contract = useRef(new ethers.Contract(contractRef.address, contractRef.abi, localProvider))
const contract = useRef(new ethers.Contract(contractRef.address, contractRef.abi, injectedProvider))

useEffect(() => {
const run = async () => {
contract.current = new ethers.Contract(contractRef.address, contractRef.abi, injectedProvider)

if (!contractRef) {
setErrorMessage('chain not supported. ' + selectedChainId)
return
@@ -102,8 +104,8 @@ export default function BrowseBadges() {
const found = eventBadges.find(x => ethers.utils.hexStripZeros(x.id) === ethers.utils.hexStripZeros(tId))
// eslint-disable-next-line no-undef
const badge = Object.assign({}, { transactionHash: found.transactionHash }, data, {
decodedIpfsHash: toBase58(data.hash),
fileName: data.image
decodedIpfsHash: toBase58(data[2]),
fileName: data[3]
})
badges.push(badge)
} catch (e) {
@@ -120,7 +122,7 @@ export default function BrowseBadges() {
setErrorMessage('')
} catch (e) {
setShowSpinner(false)
setErrorMessage(e.message)
setErrorMessage("Please make sure your injected provider (metamask) is connected to the right network." + e.message)
}
} else {
setErrorMessage('')
@@ -136,8 +138,8 @@ export default function BrowseBadges() {
const found = eventBadges.find(x => ethers.utils.hexStripZeros(x.id) === ethers.utils.hexStripZeros(tId))
// eslint-disable-next-line no-undef
const badge = Object.assign({}, { transactionHash: found.transactionHash }, data, {
decodedIpfsHash: toBase58(data.hash),
fileName: data.image
decodedIpfsHash: toBase58(data[2]),
fileName: data[3]
})
badges.push(badge)
} catch (e) {