Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

[PROD] Deploy to prod #128

Closed
wants to merge 62 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
6167769
Show receiver EoA
dzbo Sep 17, 2023
71101ad
Soft disconnect on session expiry
dzbo Sep 18, 2023
a374968
Refresh both balances after send
dzbo Sep 18, 2023
d9cfbd9
Reset send step upon enter
dzbo Sep 18, 2023
90c5d6f
Fix profile switch
dzbo Sep 18, 2023
53b9d62
Fix lyx logo
dzbo Sep 18, 2023
16ace67
Fix lint
dzbo Sep 18, 2023
5c5f8e2
Fix test
dzbo Sep 18, 2023
cc3ff91
Fix error message
dzbo Sep 18, 2023
c39075c
Separate links
dzbo Sep 18, 2023
63c398d
Merge pull request #82 from lukso-network/fix/show-receiver-eoa-DEV-8220
jnorbert Sep 18, 2023
21d9747
Merge branch 'develop' into fix/update-balance-DEV-8270-DEV-8272
jnorbert Sep 18, 2023
6214321
Merge branch 'develop' into feat/soft-disconnect-DEV-8264
jnorbert Sep 18, 2023
95ce8f9
Merge branch 'develop' into fix/profile-change-issue-DEV-8307
jnorbert Sep 18, 2023
7d8c243
Merge pull request #83 from lukso-network/fix/update-balance-DEV-8270…
jnorbert Sep 18, 2023
e98cd68
Merge branch 'develop' into fix/profile-change-issue-DEV-8307
jnorbert Sep 18, 2023
c9e8739
Merge branch 'develop' into feat/soft-disconnect-DEV-8264
jnorbert Sep 18, 2023
d395eef
Merge pull request #81 from lukso-network/feat/soft-disconnect-DEV-8264
jnorbert Sep 18, 2023
78b18b2
Fix own info
dzbo Sep 18, 2023
8b28772
Merge branch 'develop' into fix/profile-change-issue-DEV-8307
dzbo Sep 18, 2023
6f98481
Lint
dzbo Sep 18, 2023
6b44896
Merge pull request #84 from lukso-network/fix/profile-change-issue-DE…
jnorbert Sep 19, 2023
9865526
Merge pull request #85 from lukso-network/fix/update-lyx-token-DEV-8236
jnorbert Sep 19, 2023
559bb4c
Merge pull request #87 from lukso-network/fix/separate-links-DEV-8256
jnorbert Sep 19, 2023
f3d4b0f
Merge branch 'develop' of github.com:lukso-network/wallet.universalpr…
dzbo Sep 19, 2023
150fcfc
Merge pull request #86 from lukso-network/fix/invalid-address-error-D…
jnorbert Sep 19, 2023
f4d5639
Merge pull request #88 from lukso-network/style/remove-nft-token-coun…
jnorbert Sep 19, 2023
48dc48b
chore: Release (#89)
dzbo Sep 21, 2023
1e7d26b
fix: Anonymous profile display (#91)
dzbo Sep 26, 2023
9cf01e4
fix: Issue with invalid path fallback (#90)
dzbo Sep 26, 2023
8496737
feat: Lower case user names (#92)
dzbo Sep 26, 2023
bceef27
feat: Show profile details (#93)
dzbo Sep 27, 2023
e07501c
Merge remote-tracking branch 'origin/main' into develop
Hugoo Sep 27, 2023
e91fba7
Merge branch 'main' of github.com:lukso-network/wallet.universalprofi…
dzbo Sep 28, 2023
66d9f91
Merge branch 'develop' of github.com:lukso-network/wallet.universalpr…
Hugoo Sep 28, 2023
351ea2b
fix: Change text in assets empty state (#98)
dzbo Oct 4, 2023
11f3a38
fix: Refresh tokens after connecting (#96)
dzbo Oct 4, 2023
fb5c128
feat: footer update (#95)
dzbo Oct 4, 2023
0ec93ed
chore: Change RPC (#97)
dzbo Oct 4, 2023
2e718e1
feat: Add docs link to footer (#100)
dzbo Oct 4, 2023
ccc0b32
feat: LYX details page (#99)
dzbo Oct 4, 2023
67fdf9f
fix: Update meta title (#101)
dzbo Oct 4, 2023
ac84607
feat: total token supply (#102)
dzbo Oct 5, 2023
ab1de63
fix: Redirect to `my.universalprofile.cloud` when clicking on logo (#…
dzbo Oct 5, 2023
5d193d7
chore: Add auto assign action (#105)
dzbo Oct 11, 2023
65990b3
feat: search profiles (#104)
dzbo Oct 11, 2023
6123bf4
feat: keyboard navigation in search (#106)
dzbo Oct 11, 2023
5ad7941
feat: Update footer (#109)
dzbo Oct 12, 2023
5f48fc1
feat(DEV-8621): add discovery link to header (#107)
doubleppereira Oct 12, 2023
8420d43
fix: Keep receiver address when tx fails (#110)
dzbo Oct 12, 2023
eaf4215
fix(DEV-8668): update github logo on footer (#112)
doubleppereira Oct 12, 2023
da138bb
feat: show tags (#115)
dzbo Oct 20, 2023
b8035a7
feat: send LSP7/LSP8 (#113)
dzbo Oct 20, 2023
d373c60
feat: FIAT currencies (#114)
dzbo Oct 20, 2023
c5c62da
chore: Refactor onMounted hook (#116)
dzbo Oct 20, 2023
c3482ea
feat: Expose global web3 instance (#118)
dzbo Oct 24, 2023
68bfd09
feat: improve error handling (#119)
dzbo Oct 24, 2023
7fcc794
feat: verify LSP4 creators (#117)
dzbo Oct 25, 2023
6aa6d58
chore: rework into Pinia ORM (#120)
dzbo Nov 2, 2023
c123da0
fix: Some upgrades erc725.js and some minor npms for security fixes (…
richtera Nov 6, 2023
5fe3c93
fix: Change to ipfs proxy in cloudflare (#123)
richtera Nov 7, 2023
49830ce
feat: network switch (#126)
dzbo Nov 8, 2023
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
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# neccessary Algolia envs for searching to work properly
ALGOLIA_APPLICATION_ID=YOUR_ALGOLIA_APPLICATION_ID
ALGOLIA_API_KEY=YOUR_ALGOLIA_API_KEY

# dev envs not needed in production
YATA_API_TOKEN=YOUR_YATA_API_TOKEN # yata api token for fetching translations
2 changes: 2 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ module.exports = {
rules: {
'import/order': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'playwright/no-networkidle': 'off',
'playwright/no-skipped-test': 'off',
},
},
{
Expand Down
20 changes: 20 additions & 0 deletions .github/auto_assign.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Set to true to add reviewers to pull requests
addReviewers: true

# Set to true to add assignees to pull requests
# It can also be set to "author"
addAssignees: false

# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
- dzbo
- richtera
- Hugoo
- doubleppereira

# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0

skipKeywords:
- chore(
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ on:
env:
CF_PROJECT_NAME: wallet-universalprofile-cloud
CF_BASE_URL: wallet-universalprofile-cloud
ALGOLIA_API_KEY: '${{ secrets.ALGOLIA_API_KEY }}'
ALGOLIA_APPLICATION_ID: '${{ secrets.ALGOLIA_APPLICATION_ID }}'

jobs:
test:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Auto Assign'
on:
pull_request:
types: [opened, ready_for_review]

jobs:
add-reviews:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected]
with:
configuration-path: '.github/auto_assign.yaml'
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ logs
.fleet
.idea
/public/assets/*
# tailwind config is used just for vs code extension intelisense
tailwind.config.js
types/contracts

# Local env files
.env
Expand Down
121 changes: 71 additions & 50 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,64 +1,39 @@
<script setup lang="ts">
import { RouteLocationNormalized, NavigationGuardNext } from 'vue-router'
import { isAddress } from 'web3-utils'

import { fetchProfile } from '@/utils/fetchProfile'
import { PROVIDERS, STORAGE_KEY } from '@/types/enums'
import { assertString } from '@/utils/validators'

if (typeof window !== 'undefined') {
// @ts-ignore
import('@lukso/web-components')
}

const web3Store = useWeb3Store()
const appStore = useAppStore()
const { providerEvents, disconnect } = useBrowserExtension()
const {
setProfile: setConnectedProfile,
setStatus,
profile: connectedProfile,
} = useConnectedProfileStore()
const { getNetwork } = useAppStore()
const { isLoadedApp, selectedChainId, modal } = storeToRefs(useAppStore())
const { addProviderEvents, removeProviderEvents, disconnect } =
useBrowserExtension()
const router = useRouter()

const setupTranslations = () => {
useIntl().setupIntl(defaultConfig)
}

const setupWeb3Instances = () => {
const setupWeb3Instances = async () => {
const provider = INJECTED_PROVIDER

if (provider) {
// for chain interactions through wallet
web3Store.addWeb3(PROVIDERS.INJECTED, provider)
providerEvents(provider)
await addProviderEvents(provider)
// expose web3 instance to global scope for console access
window.web3 = web3Store.getWeb3(PROVIDERS.INJECTED)
} else {
console.error('No browser extension provider found')
}

// for chain interactions through RPC endpoint
web3Store.addWeb3(
PROVIDERS.RPC,
appStore.getNetwork(appStore.selectedNetwork).rpcHttp
)
}

const setupConnectedProfile = async () => {
try {
const connectedAddress = getItem(STORAGE_KEY.CONNECTED_ADDRESS)

if (connectedAddress) {
assertAddress(connectedAddress, 'profile')
setStatus('isConnected', true)
setStatus('isProfileLoading', true)
const profile = await fetchProfile(connectedAddress)
connectedProfile.address = connectedAddress
setConnectedProfile(profile)
}
} catch (error) {
console.error(error)
} finally {
setStatus('isProfileLoading', false)
}
web3Store.addWeb3(PROVIDERS.RPC, getNetwork(selectedChainId.value).rpcHttp)
}

const routerBackProfileLoad = async () => {
Expand All @@ -71,20 +46,17 @@ const routerBackProfileLoad = async () => {
const fromProfileAddress = from.params?.profileAddress
const toProfileAddress = to.params?.profileAddress

if (!fromProfileAddress || !toProfileAddress) {
return next()
}

try {
assertString(toProfileAddress)
assertAddress(toProfileAddress, 'profile')

if (toProfileAddress !== fromProfileAddress) {
await setupViewedProfile(toProfileAddress)
await setupViewedAssets(toProfileAddress)
if (toProfileAddress) {
try {
assertString(toProfileAddress)
assertAddress(toProfileAddress, 'profile')
if (toProfileAddress !== fromProfileAddress) {
await fetchProfile(toProfileAddress)
await fetchAssets(toProfileAddress)
}
} catch (error) {
console.error(error)
}
} catch (error) {
console.error(error)
}
next()
}
Expand All @@ -109,12 +81,61 @@ const checkConnectionExpiry = () => {
setInterval(expiryCheck, CONNECTION_EXPIRY_CHECK_INTERVAL_MS)
}

const setupCurrencies = async () => {
const { currencyList } = storeToRefs(useCurrencyStore())
const { fetchCurrencies } = useCurrency()

currencyList.value = await fetchCurrencies()
}

const setupViewedProfile = async () => {
try {
const profileAddress = useRouter().currentRoute.value.params?.profileAddress

if (profileAddress) {
if (isAddress(profileAddress)) {
await fetchProfile(profileAddress)
await fetchAssets(profileAddress)
} else {
navigateTo(notFoundRoute())
}
}
} catch (error: unknown) {
console.error(error)

if (error instanceof EoAError) {
navigateTo(notFoundRoute()) // TODO we might want to inform user about EoA instead showing 404
}
}
}

onMounted(async () => {
setupTranslations()
setupWeb3Instances()
await setupWeb3Instances()
checkConnectionExpiry()
await setupConnectedProfile()
await routerBackProfileLoad()
await setupViewedProfile()

isLoadedApp.value = true

await setupCurrencies()
})

onUnmounted(() => {
const provider = INJECTED_PROVIDER
removeProviderEvents(provider)
})

useHead({
bodyAttrs: {
class: computed(() => {
if (modal.value?.isOpen) {
return 'overflow-hidden'
}

return ''
}),
},
})
</script>

Expand Down
63 changes: 63 additions & 0 deletions components/AppAvatar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<script setup lang="ts">
import makeBlockie from 'ethereum-blockies-base64'

import { Profile } from '@/models/profile'

type Props = {
isLoading?: boolean
isEoa?: boolean
isError?: boolean
profile?: Profile
}

defineProps<Props>()
</script>

<template>
<div v-if="isLoading" class="flex flex-col items-center">
<div
class="w-20 h-20 bg-neutral-100 rounded-full flex items-center justify-center mb-2"
>
<lukso-icon name="progress-indicator" size="x-large"></lukso-icon>
</div>
<lukso-username name="--" size="small" hide-prefix></lukso-username>
</div>
<div v-else-if="isError" class="flex flex-col items-center">
<lukso-profile size="large" class="mb-2"></lukso-profile>
<lukso-username name="--" size="small" hide-prefix></lukso-username>
</div>
<div v-else-if="isEoa" class="flex flex-col items-center">
<lukso-profile
v-if="profile?.address"
size="large"
:profile-url="makeBlockie(profile.address)"
class="mb-2"
></lukso-profile>
<lukso-username
:address="profile?.address"
size="small"
slice-by="4"
></lukso-username>
</div>
<div v-else class="flex flex-col items-center">
<lukso-profile
size="large"
:profile-url="profile?.profileImage?.base64"
:profile-address="profile?.address"
has-identicon
class="mb-2"
></lukso-profile>
<lukso-username
v-if="profile?.name"
:name="profile.name"
size="small"
></lukso-username>
<lukso-username
v-else-if="profile?.address"
:address="profile.address"
size="small"
slice-by="4"
></lukso-username>
<lukso-username v-else name="--" size="small" hide-prefix></lukso-username>
</div>
</template>
4 changes: 2 additions & 2 deletions components/AppButtonConnectOrInstall.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
const { connect, isUniversalProfileExtension } = useBrowserExtension()
const { status } = useConnectedProfileStore()
const { isConnecting } = storeToRefs(useAppStore())

const handleConnect = async () => {
connect()
Expand All @@ -27,7 +27,7 @@ const browserSupportExtension = extensionStore.url !== ''
variant="landing"
custom-class="mt-6"
is-full-width
:disabled="status.isConnecting ? true : undefined"
:disabled="isConnecting ? true : undefined"
>
{{ $formatMessage('connect_or_install_button_connect') }}
</lukso-button>
Expand Down
Loading