Skip to content

Commit

Permalink
Merge branch 'dev/mikaelvallenet/fix/organization-posting-post' into …
Browse files Browse the repository at this point in the history
…dev/mikaelvallenet/feat/register-dao-to-profile-realm
  • Loading branch information
MikaelVallenet committed Nov 8, 2024
2 parents d368965 + 3dee11a commit 656b087
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 13 deletions.
10 changes: 5 additions & 5 deletions assets/icons/warning.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion packages/components/WalletProviderIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import keplrSVG from "../../assets/icons/keplr.svg";
import leapSVG from "../../assets/icons/leap-cosmos-logo.svg";
import metamaskSVG from "../../assets/icons/metamask.svg";
import warningSVG from "../../assets/icons/warning.svg";
import { errorColor } from "../utils/style/colors";
import { WalletProvider } from "../utils/walletProvider";

export const WalletProviderIcon: React.FC<{
Expand All @@ -23,7 +24,14 @@ export const WalletProviderIcon: React.FC<{
case WalletProvider.Adena:
return <SVG width={size} height={size} source={adenaSVG} />;
case WalletProvider.Gnotest:
return <SVG width={size} height={size} source={warningSVG} />;
return (
<SVG
width={size}
height={size}
source={warningSVG}
color={errorColor}
/>
);
default:
return <View style={{ width: size, height: size }} />;
}
Expand Down
8 changes: 4 additions & 4 deletions packages/components/socialFeed/NewsFeed/NewsFeedInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const NewsFeedInput = React.forwardRef<
const selectedNetwork = useSelectedNetworkInfo();
const selectedNetworkId = selectedNetwork?.id || "teritori";
const selectedWallet = useSelectedWallet();
const posterId = daoId || selectedWallet?.userId;
const authorId = daoId || selectedWallet?.userId;
const inputRef = useRef<TextInput>(null);
const { setToastError } = useFeedbacks();
const [isUploadLoading, setIsUploadLoading] = useState(false);
Expand Down Expand Up @@ -182,7 +182,7 @@ export const NewsFeedInput = React.forwardRef<
setStep,
} = useFeedPosting(
selectedNetwork?.id,
posterId,
authorId,
postCategory,
onPostCreationSuccess,
);
Expand Down Expand Up @@ -218,7 +218,7 @@ export const NewsFeedInput = React.forwardRef<
amount: publishingFee.amount.toString(),
denom: publishingFee.denom || "",
},
userId: posterId,
userId: authorId,
});
return;
}
Expand Down Expand Up @@ -261,7 +261,7 @@ export const NewsFeedInput = React.forwardRef<
setStep(feedPostingStep(FeedPostingStepId.GENERATING_KEY));

const pinataJWTKey =
userIPFSKey || (await generateIpfsKey(selectedNetworkId, posterId));
userIPFSKey || (await generateIpfsKey(selectedNetworkId, authorId));

if (pinataJWTKey) {
setStep(feedPostingStep(FeedPostingStepId.UPLOADING_FILES));
Expand Down
13 changes: 10 additions & 3 deletions packages/components/toasts/NormalToast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
neutral11,
neutral77,
successColor,
warningColor,
} from "../../utils/style/colors";
import { BrandText } from "../BrandText";
import { SVG } from "../SVG";
Expand All @@ -19,7 +20,7 @@ export interface NormalToastProps {
title: string;
message?: string;
onPress?: () => void;
type?: "error" | "success";
type?: "error" | "success" | "warning";
topOffset?: number;
}

Expand Down Expand Up @@ -56,11 +57,16 @@ export const NormalToast: React.FC<NormalToastProps> = ({
flexDirection: "row",
alignItems: "center",
backgroundColor: neutral11,
borderColor: type === "error" ? errorColor : successColor,
borderColor:
type === "error"
? errorColor
: type === "warning"
? warningColor
: successColor,
borderWidth: 1,
}}
>
{type === "error" && (
{(type === "error" || type === "warning") && (
<>
<SpacerRow size={3} />
<SVG
Expand All @@ -70,6 +76,7 @@ export const NormalToast: React.FC<NormalToastProps> = ({
style={{
flexShrink: 0,
}}
color={type === "error" ? errorColor : warningColor}
/>
</>
)}
Expand Down
1 change: 1 addition & 0 deletions packages/utils/style/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export const primaryTextColor = "#2B0945";

export const secondaryColor = "#FFFFFF";
export const successColor = "#C8FFAE";
export const warningColor = "#FFE768";
export const errorColor = "#F46F76";
export const toastRed = "#F34242";
export const toastGreen = "#52DB68";
Expand Down

0 comments on commit 656b087

Please sign in to comment.