Skip to content

Commit

Permalink
Merge branch 'main' into fix/group-chat
Browse files Browse the repository at this point in the history
  • Loading branch information
omniwired committed Apr 23, 2024
2 parents 74a7457 + 090b710 commit 3c88a45
Show file tree
Hide file tree
Showing 66 changed files with 1,437 additions and 360 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/mobile-build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ jobs:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Expo prebuild
run: npx expo prebuild

- name: Fix privacy
run: npx tsx ./packages/scripts/app-build/createPrivacyInfo.ts

- name: Build ios
run: eas build --local --non-interactive --platform=ios

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Here are the steps to follow:

The Teritori dApp is a multi-networks app. Meaning it can be used with multiple blockchains and web3 stacks. We use the term `Network` because the underlying distributed ledger technology could be something else than a blockchain.

It's important to understand the implications of that and not hardcode `tori` everywhere. Even when we only talk avout Teritori, there is currently two official Teritori chains, the Teritori mainnet, with chain id `teritori-1` and the Teritori testnet with chain id `teritori-test-6` and it's important to support both in all code.
It's important to understand the implications of that and not hardcode `tori` everywhere. Even when we only talk avout Teritori, there is currently two official Teritori chains, the Teritori mainnet, with chain id `teritori-1` and the Teritori testnet with chain id `teritori-test-7` and it's important to support both in all code.

We define network-related constants in the [networks package](packages/networks) and generate code from it for go programs. You should get all network information from this packages and add any new network-related information there.

Expand Down
9 changes: 1 addition & 8 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ const config = {
NSPhotoLibraryUsageDescription:
"Access to your photo library is required for image upload functionality.",
ITSAppUsesNonExemptEncryption: false,
NSPrivacyAccessedAPICategoryDiskSpace:
"To efficiently manage local storage and cache files for improved app performance.",
NSPrivacyAccessedAPICategoryFileTimestamp:
"To track file modification dates for app data synchronization and integrity checks.",
NSPrivacyAccessedAPICategoryUserDefaults:
"To store user preferences and settings locally for a customized user experience.",
NSPrivacyAccessedAPICategorySystemBootTime:
"To optimize app launch times and resource utilization based on system boot information.",
UIBackgroundModes: ["audio"],
},
},
Expand Down Expand Up @@ -77,6 +69,7 @@ const config = {
"react-native-vision-camera",
{
cameraPermissionText: "$(PRODUCT_NAME) needs access to your Camera.",
enableCodeScanner: true,
},
],
],
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm-contracts/cw721-membership/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ADMIN=testnet-adm
ADMIN_ADDR=$(shell teritorid keys show $(ADMIN) --keyring-backend test --output json | jq -r .address)
NODE_FLAG=--node https://rpc.testnet.teritori.com:443
TX_FLAGS=--from $(ADMIN) --chain-id teritori-test-6 $(NODE_FLAG) --gas auto --gas-adjustment 1.3 -y -b sync --output json --keyring-backend test -o json
TX_FLAGS=--from $(ADMIN) --chain-id teritori-test-7 $(NODE_FLAG) --gas auto --gas-adjustment 1.3 -y -b sync --output json --keyring-backend test -o json
QUERY_FLAGS=$(NODE_FLAG) -o json
CODE_ID=66
CONFIG=$(shell cat config.json | jq --rawfile desc desc.txt -r '.admin_addr="$(ADMIN_ADDR)" | .description=$$desc | tojson | @sh')
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm-contracts/nft-marketplace/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ADMIN=testnet-adm
ADMIN_ADDR=$(shell teritorid keys show $(ADMIN) --keyring-backend test --output json | jq -r .address)
NODE_FLAG=--node https://rpc.testnet.teritori.com:443
TX_FLAGS=--from $(ADMIN) --chain-id teritori-test-6 $(NODE_FLAG) --gas auto --gas-adjustment 1.3 -y -b sync --output json --keyring-backend test -o json
TX_FLAGS=--from $(ADMIN) --chain-id teritori-test-7 $(NODE_FLAG) --gas auto --gas-adjustment 1.3 -y -b sync --output json --keyring-backend test -o json
QUERY_FLAGS=$(NODE_FLAG) -o json
CODE_ID=52
CONFIG=$(shell cat config.json | jq --rawfile desc desc.txt -r '.admin_addr="$(ADMIN_ADDR)" | .description=$$desc | tojson | @sh')
Expand Down
113 changes: 95 additions & 18 deletions networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2584,8 +2584,8 @@
"testnet": false,
"backendEndpoint": "https://dapp-backend.mainnet.teritori.com",
"addressPrefix": "cosmos",
"restEndpoint": "https://api-cosmoshub-ia.cosmosia.notional.ventures",
"rpcEndpoint": "https://rpc-cosmoshub-ia.cosmosia.notional.ventures",
"restEndpoint": "https://rest-cosmoshub.ecostake.com",
"rpcEndpoint": "https://rpc-cosmoshub.ecostake.com",
"stakeCurrency": "uatom",
"gasPriceStep": {
"low": 0.01,
Expand Down Expand Up @@ -9416,6 +9416,45 @@
"nameServiceDefaultImage": "https://raw.githubusercontent.com/cosmos/chain-registry/master/rizon/images/atolo.svg",
"cosmosFeatures": []
},
{
"id": "saga",
"displayName": "Saga",
"chainId": "ssc-1",
"registryName": "saga",
"overrides": "cosmos-registry:saga",
"kind": "Cosmos",
"currencies": [
{
"kind": "native",
"denom": "usaga",
"decimals": 6,
"displayName": "SAGA",
"coingeckoId": "saga-2",
"icon": "https://raw.githubusercontent.com/cosmos/chain-registry/master/saga/images/saga.svg",
"color": "TODO"
}
],
"features": [],
"featureObjects": [],
"idPrefix": "saga",
"addressPrefix": "saga",
"txExplorer": "https://www.mintscan.io/saga/transactions/$hash",
"accountExplorer": "https://www.mintscan.io/saga/accounts/$address",
"contractExplorer": "https://www.mintscan.io/saga/accounts/$address",
"icon": "https://raw.githubusercontent.com/cosmos/chain-registry/master/saga/images/saga.svg",
"testnet": false,
"backendEndpoint": "",
"restEndpoint": "https://saga-rest.publicnode.com",
"rpcEndpoint": "https://saga-rpc.publicnode.com:443",
"stakeCurrency": "usaga",
"gasPriceStep": {
"low": 0.01,
"average": 0.025,
"high": 0.04
},
"nameServiceDefaultImage": "https://raw.githubusercontent.com/cosmos/chain-registry/master/saga/images/saga.svg",
"cosmosFeatures": []
},
{
"id": "cosmos-registry:sagatestnet",
"displayName": "Saga Testnet",
Expand Down Expand Up @@ -9454,6 +9493,44 @@
"nameServiceDefaultImage": "https://raw.githubusercontent.com/cosmos/chain-registry/master/saga/images/saga.png",
"cosmosFeatures": []
},
{
"id": "sagatestnet2",
"displayName": "Saga Testnet 2",
"chainId": "ssc-testnet-2",
"registryName": "sagatestnet2",
"kind": "Cosmos",
"currencies": [
{
"kind": "native",
"denom": "utsaga",
"decimals": 6,
"displayName": "TSAGA",
"coingeckoId": "not-found",
"icon": "https://raw.githubusercontent.com/cosmos/chain-registry/master/saga/images/saga.svg",
"color": "TODO"
}
],
"features": [],
"featureObjects": [],
"idPrefix": "sagatestnet2",
"addressPrefix": "saga",
"txExplorer": "https://www.mintscan.io/saga-testnet/tx/$hash",
"accountExplorer": "https://mintscan.io/saga-testnet/address/$address",
"contractExplorer": "https://mintscan.io/saga-testnet/address/$address",
"icon": "https://raw.githubusercontent.com/cosmos/chain-registry/master/saga/images/saga.png",
"testnet": true,
"backendEndpoint": "",
"restEndpoint": "https://testnet2-keplr-lcd.sagarpc.io",
"rpcEndpoint": "https://testnet2-keplr.sagarpc.io",
"stakeCurrency": "utsaga",
"gasPriceStep": {
"low": 0.0025,
"average": 0.025,
"high": 0.04
},
"nameServiceDefaultImage": "https://raw.githubusercontent.com/cosmos/chain-registry/master/saga/images/saga.png",
"cosmosFeatures": []
},
{
"id": "cosmos-registry:akashtestnet",
"displayName": "Sandbox Testnet",
Expand Down Expand Up @@ -10966,7 +11043,7 @@
{
"id": "teritori-testnet",
"kind": "Cosmos",
"chainId": "teritori-test-6",
"chainId": "teritori-test-7",
"displayName": "Teritori Testnet",
"registryName": "teritoritestnet",
"icon": "teritori.svg",
Expand All @@ -10985,7 +11062,7 @@
"featureObjects": [
{
"type": "CosmWasmPremiumFeed",
"membershipContractAddress": "tori1rs244rjrhap2v4setxlugkh8ungxlrsh8asvh0trsgvqvplvkd5q7752l6",
"membershipContractAddress": "",
"mintDenom": "utori"
}
],
Expand Down Expand Up @@ -11032,33 +11109,33 @@
"no-legacy-stdTx",
"ibc-go"
],
"nameServiceContractAddress": "tori14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s3hewys",
"nameServiceContractAddress": "",
"nameServiceDefaultImage": "ipfs://bafkreieqcwmjcb64r42ygs6a4dswz63djzgayjn3rhzjber3e42cknawlm",
"nameServiceTLD": ".tori",
"vaultContractAddress": "tori17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9jfksztgw5uh69wac2pgs9ezf0j",
"riotContractAddressGen0": "tori1hzz0s0ucrhdp6tue2lxk3c03nj6f60qy463we7lgx0wudd72ctmstg4wkc",
"vaultContractAddress": "",
"riotContractAddressGen0": "",
"riotContractAddressGen1": "",
"riotSquadStakingContractAddressV1": "",
"riotSquadStakingContractAddressV2": "",
"distributorContractAddress": "",
"riotersFooterContractAddress": "",
"secondaryDuringMintList": [
"tori1rs244rjrhap2v4setxlugkh8ungxlrsh8asvh0trsgvqvplvkd5q7752l6",
"tori14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s3hewys",
"tori1hzz0s0ucrhdp6tue2lxk3c03nj6f60qy463we7lgx0wudd72ctmstg4wkc",
"",
"",
"",
""
],
"excludeFromLaunchpadList": [
""
],
"socialFeedContractAddress": "tori1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrqazuvxk",
"daoCoreCodeId": 4,
"daoPreProposeSingleCodeId": 5,
"daoProposalSingleCodeId": 6,
"daoCw4GroupCodeId": 7,
"daoVotingCw4CodeId": 8,
"daoFactoryCodeId": 9,
"daoFactoryContractAddress": "tori1s85asu5dckeelmgzrwqakxc8tc4gllutjq4uq3a4lwak2hfp9c3q4spguf"
"socialFeedContractAddress": "",
"daoCoreCodeId": -1,
"daoPreProposeSingleCodeId": -1,
"daoProposalSingleCodeId": -1,
"daoCw4GroupCodeId": -1,
"daoVotingCw4CodeId": -1,
"daoFactoryCodeId": -1,
"daoFactoryContractAddress": ""
},
{
"id": "cosmos-registry:terpnettestnet",
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@
"electron-store": "^8.1.0",
"eslint-config-universe": "^12.0.0",
"ethers": "^5.7.2",
"expo": "~50.0.14",
"expo-av": "~13.10.5",
"expo": "~50.0.17",
"expo-av": "~13.10.6",
"expo-blur": "~12.9.2",
"expo-clipboard": "~5.0.1",
"expo-document-picker": "~11.10.1",
"expo-file-system": "~16.0.8",
"expo-file-system": "~16.0.9",
"expo-font": "~11.10.3",
"expo-image-picker": "^14.7.1",
"expo-linear-gradient": "~12.7.2",
Expand Down Expand Up @@ -116,6 +116,7 @@
"react-dom": "18.2.0",
"react-hook-form": "^7.50.1",
"react-leaflet": "^4.2.1",
"react-leaflet-cluster": "^2.1.0",
"react-native": "0.73.6",
"react-native-click-outside": "^0.1.1",
"react-native-confetti-cannon": "^1.5.2",
Expand Down
52 changes: 31 additions & 21 deletions packages/components/buttons/SocialButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { ViewStyle, View, StyleProp, TouchableOpacity } from "react-native";
import { ViewStyle, StyleProp, TouchableOpacity } from "react-native";
import { SvgProps } from "react-native-svg";

import { BrandText } from "../BrandText";
Expand All @@ -9,9 +9,13 @@ import { Box } from "../boxes/Box";
import { neutral22, neutral33, withAlpha } from "@/utils/style/colors";
import { fontMedium14 } from "@/utils/style/fonts";

// TODO: remove uses of Box component directly in other components
export const iconSize = 32;
export const iconPadding = 12;
export const outerPadding = 6;
export const innerGap = 8;

export const SocialButton: React.FC<{
text: string;
text?: string;
iconSvg: React.FC<SvgProps>;
onPress?: () => void;
style?: StyleProp<ViewStyle>;
Expand All @@ -20,29 +24,35 @@ export const SocialButton: React.FC<{
<TouchableOpacity onPress={onPress} style={style}>
<Box
style={{
height: 44,
paddingVertical: outerPadding,
backgroundColor: withAlpha(neutral22, 0.64),
justifyContent: "center",
paddingLeft: outerPadding,
paddingRight: outerPadding + (text ? innerGap : 0),
flexDirection: "row",
alignItems: "center",
}}
>
<View style={{ flexDirection: "row", alignItems: "center" }}>
<Box
style={{
marginLeft: 6,
backgroundColor: neutral33,
borderRadius: 6,
width: 32,
height: 32,
justifyContent: "center",
alignItems: "center",
}}
>
<SVG source={iconSvg} height={20} width={20} />
</Box>
<BrandText style={[fontMedium14, { marginLeft: 8, marginRight: 16 }]}>
<Box
style={{
backgroundColor: neutral33,
borderRadius: 6,
width: iconSize,
height: iconSize,
justifyContent: "center",
alignItems: "center",
}}
>
<SVG
source={iconSvg}
height={iconSize - iconPadding}
width={iconSize - iconPadding}
/>
</Box>
{!!text && (
<BrandText style={[fontMedium14, { marginLeft: innerGap }]}>
{text}
</BrandText>
</View>
)}
</Box>
</TouchableOpacity>
);
Expand Down
Loading

0 comments on commit 3c88a45

Please sign in to comment.