Skip to content

Commit

Permalink
Refactor/importing-classes-from-gnonative (#120)
Browse files Browse the repository at this point in the history
* refactor: importing classes from gnonative package.
* chore: gnonative upgrade
---------

Signed-off-by: Iuri Pereira <689440+iuricmp@users.noreply.github.com>
  • Loading branch information
iuricmp authored Jul 25, 2024
1 parent c64035f commit 2f7516d
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 27 deletions.
3 changes: 1 addition & 2 deletions mobile/app/home/profile.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Alert, StyleSheet, View } from "react-native";
import { router, useNavigation } from "expo-router";
import { useEffect, useState } from "react";
import { useGnoNativeContext } from "@gnolang/gnonative";
import { KeyInfo, useGnoNativeContext } from "@gnolang/gnonative";
import { logedOut, useAppDispatch } from "@gno/redux";
import Button from "@gno/components/button";
import { KeyInfo } from "@buf/gnolang_gnonative.bufbuild_es/gnonativetypes_pb";
import Layout from "@gno/components/layout";
import { LoadingModal } from "@gno/components/loading";
import { AccountBalance } from "@gno/components/settings";
Expand Down
3 changes: 1 addition & 2 deletions mobile/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import ReenterPassword from "@gno/components/modal/reenter-password";
import Ruller from "@gno/components/row/Ruller";
import Text from "@gno/components/text";
import { loggedIn, useAppDispatch } from "@gno/redux";
import { KeyInfo } from "@buf/gnolang_gnonative.bufbuild_es/gnonativetypes_pb";
import { useGnoNativeContext } from "@gnolang/gnonative";
import { KeyInfo, useGnoNativeContext } from "@gnolang/gnonative";
import Spacer from "@gno/components/spacer";
import * as Application from "expo-application";

Expand Down
2 changes: 1 addition & 1 deletion mobile/components/list/account/account-list.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { KeyInfo } from "@gnolang/gnonative";
import SideMenuAccountItem from "./account-item";
import { KeyInfo } from "@buf/gnolang_gnonative.bufbuild_es/gnonativetypes_pb";

interface SideMenuAccountListProps {
accounts: KeyInfo[];
Expand Down
3 changes: 1 addition & 2 deletions mobile/components/modal/reenter-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import {
TextInput as RNTextInput,
} from "react-native";
import { GRPCError } from "@gnolang/gnonative/src/grpc/error";
import { ErrCode } from "@buf/gnolang_gnonative.bufbuild_es/rpc_pb";
import Alert from "@gno/components/alert";
import { useGnoNativeContext } from "@gnolang/gnonative";
import { useGnoNativeContext, ErrCode } from "@gnolang/gnonative";
import { ModalView } from ".";
import TextInput from "../textinput";
import Text from "../text";
Expand Down
3 changes: 1 addition & 2 deletions mobile/components/settings/account/account-balance.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useEffect, useState } from "react";
import { KeyInfo } from "@buf/gnolang_gnonative.bufbuild_es/gnonativetypes_pb";
import Text from "@gno/components/text";
import { useGnoNativeContext } from "@gnolang/gnonative";
import { KeyInfo, useGnoNativeContext } from "@gnolang/gnonative";
import { useSearch } from "@gno/hooks/use-search";
import * as Application from "expo-application";

Expand Down
16 changes: 4 additions & 12 deletions mobile/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
"@buf/gnolang_dsocial-indexer.connectrpc_es": "^1.4.0-20240621073300-3f8442294fd1.3",
"@buf/gnolang_dsocial-notification.bufbuild_es": "^1.10.0-20240621073240-68037cb72eee.1",
"@buf/gnolang_dsocial-notification.connectrpc_es": "^1.4.0-20240621073240-68037cb72eee.3",
"@buf/gnolang_gnonative.bufbuild_es": "^1.9.0-20240430140846-fe9f3938584d.1",
"@bufbuild/protobuf": "^1.6.0",
"@connectrpc/connect": "^1.2.1",
"@connectrpc/connect-web": "^1.2.1",
"@gnolang/gnonative": "^1.4.0",
"@gnolang/gnonative": "^1.5.0",
"@reduxjs/toolkit": "^2.1.0",
"base-64": "^1.0.0",
"date-fns": "^3.6.0",
"expo": "~51.0.8",
"expo-application": "~5.9.1",
"expo-clipboard": "~6.0.3",
"expo-constants": "~16.0.2",
"expo-dev-client": "~4.0.18",
"expo-device": "~6.0.2",
"expo-linear-gradient": "~13.0.2",
"expo-linking": "~6.3.1",
Expand All @@ -51,8 +51,7 @@
"react-redux": "^9.1.0",
"styled-components": "^6.1.8",
"text-encoding": "^0.7.0",
"web-streams-polyfill": "^3.3.2",
"expo-dev-client": "~4.0.18"
"web-streams-polyfill": "^3.3.2"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand Down
3 changes: 1 addition & 2 deletions mobile/redux/features/accountSlice.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { createAsyncThunk, createSlice } from "@reduxjs/toolkit";
import { User } from "@gno/types";
import { KeyInfo } from "@buf/gnolang_gnonative.bufbuild_es/gnonativetypes_pb";
import { GnoNativeApi } from "@gnolang/gnonative";
import { GnoNativeApi, KeyInfo } from "@gnolang/gnonative";
import { ThunkExtra } from "redux/redux-provider";

export interface CounterState {
Expand Down

0 comments on commit 2f7516d

Please sign in to comment.