fix: TypeScript errors, shadow deprecations, and build configuration

- Fix shadow style deprecation warnings across components (boxShadow)
- Add type declaration files (codec.d.ts, modules.d.ts)
- Update metro.config.cjs for proper asset extensions
- Update tsconfig.json with module resolution settings
- Fix TypeScript errors in shared/lib files
- Update app icons (optimized PNG files)
This commit is contained in:
2026-01-15 09:37:37 +03:00
parent 0cac4023ff
commit ba74fe4298
28 changed files with 225 additions and 75 deletions
@@ -114,7 +114,7 @@ const DelegationScreen: React.FC = () => {
// Fetch user's delegations
if (selectedAccount) {
const userVoting = await api.query.democracy.voting(selectedAccount.address);
const userVoting = await api.query.democracy.voting(selectedAccount.address) as any;
if (userVoting.isDelegating) {
const delegating = userVoting.asDelegating;
setUserDelegations([{
@@ -47,12 +47,12 @@ const ElectionsScreen: React.FC = () => {
// Fetch commission proposals (acting as elections)
if (api.query.dynamicCommissionCollective?.proposals) {
const proposalHashes = await api.query.dynamicCommissionCollective.proposals();
const proposalHashes = await api.query.dynamicCommissionCollective.proposals() as any;
const electionsData: ElectionInfo[] = [];
for (const hash of proposalHashes) {
const voting = await api.query.dynamicCommissionCollective.voting(hash);
for (const hash of (proposalHashes || [])) {
const voting = await api.query.dynamicCommissionCollective.voting(hash) as any;
if (voting.isSome) {
const voteData = voting.unwrap();
electionsData.push({
@@ -111,7 +111,7 @@ const ForumScreen: React.FC = () => {
};
const getCategoryById = (categoryId: string): Category | undefined => {
return CATEGORIES.find(c => c.id === categoryId);
return categories.find((c: Category) => c.id === categoryId);
};
const getTimeAgo = (dateString: string): string => {
@@ -209,7 +209,7 @@ const ForumScreen: React.FC = () => {
📋 All Topics
</Text>
</TouchableOpacity>
{CATEGORIES.map((category) => (
{categories.map((category) => (
<TouchableOpacity
key={category.id}
style={[