Skip to content

Commit

Permalink
feat: fix patch and update Presentation Request Denied screen (#1041)
Browse files Browse the repository at this point in the history
Signed-off-by: Bryce McMath <[email protected]>
  • Loading branch information
bryce-mcmath authored Dec 6, 2023
1 parent 4fd206d commit a8dac14
Show file tree
Hide file tree
Showing 10 changed files with 379 additions and 240 deletions.
142 changes: 142 additions & 0 deletions .yarn/patches/@aries-framework-react-hooks-npm-0.4.2-84b7eb8764.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
diff --git a/@aries-framework+react-hooks+0.3.0.patch b/@aries-framework+react-hooks+0.3.0.patch
new file mode 100644
index 0000000000000000000000000000000000000000..295977820f985bccc39693bc354dc30dd8fda806
--- /dev/null
+++ b/@aries-framework+react-hooks+0.3.0.patch
@@ -0,0 +1,68 @@
+diff --git a/build/AgentProvider.d.ts b/build/AgentProvider.d.ts
+index d6256cc..6ca0215 100644
+--- a/build/AgentProvider.d.ts
++++ b/build/AgentProvider.d.ts
+@@ -4,10 +4,8 @@ import * as React from 'react';
+ interface AgentContextInterface {
+ loading: boolean;
+ agent?: Agent;
++ setAgent: (agent?: Agent) => void;
+ }
+ export declare const useAgent: () => AgentContextInterface;
+-interface Props {
+- agent: Agent | undefined;
+-}
+-declare const AgentProvider: React.FC<PropsWithChildren<Props>>;
++declare const AgentProvider: React.FC<PropsWithChildren>;
+ export default AgentProvider;
+diff --git a/build/AgentProvider.js b/build/AgentProvider.js
+index b30b8b5..1c6c16a 100644
+--- a/build/AgentProvider.js
++++ b/build/AgentProvider.js
+@@ -38,24 +38,19 @@ const useAgent = () => {
+ return agentContext;
+ };
+ exports.useAgent = useAgent;
+-const AgentProvider = ({ agent, children }) => {
+- const [agentState, setAgentState] = (0, react_1.useState)({
++const AgentProvider = ({ children }) => {
++ const [state, setState] = (0, react_1.useState)({
+ loading: true,
+- agent,
++ agent: undefined,
+ });
+- const setInitialState = async () => {
+- if (agent) {
+- setAgentState({ agent, loading: false });
+- }
++ const setAgent = (agent) => {
++ setState({ agent, loading: false });
+ };
+- (0, react_1.useEffect)(() => {
+- setInitialState();
+- }, [agent]);
+- return (React.createElement(AgentContext.Provider, { value: agentState },
+- React.createElement(ConnectionProvider_1.default, { agent: agent },
+- React.createElement(CredentialProvider_1.default, { agent: agent },
+- React.createElement(ProofProvider_1.default, { agent: agent },
+- React.createElement(BasicMessageProvider_1.default, { agent: agent }, children))))));
++ return (React.createElement(AgentContext.Provider, { value: Object.assign({ setAgent }, state) },
++ React.createElement(ConnectionProvider_1.default, { agent: state.agent },
++ React.createElement(CredentialProvider_1.default, { agent: state.agent },
++ React.createElement(ProofProvider_1.default, { agent: state.agent },
++ React.createElement(BasicMessageProvider_1.default, { agent: state.agent }, children))))));
+ };
+ exports.default = AgentProvider;
+-//# sourceMappingURL=AgentProvider.js.map
+\ No newline at end of file
++//# sourceMappingURL=AgentProvider.js.maps
+\ No newline at end of file
+diff --git a/build/AgentProvider.js.map b/build/AgentProvider.js.map
+index dd4dc30..f1f17a4 100644
+--- a/build/AgentProvider.js.map
++++ b/build/AgentProvider.js.map
+@@ -1 +1 @@
+-{"version":3,"file":"AgentProvider.js","sourceRoot":"","sources":["../src/AgentProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGA,6CAA8B;AAC9B,iCAAsE;AAEtE,kFAAyD;AACzD,8EAAqD;AACrD,8EAAqD;AACrD,oEAA2C;AAO3C,MAAM,YAAY,GAAG,IAAA,qBAAa,EAAoC,SAAS,CAAC,CAAA;AAEzE,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,MAAM,YAAY,GAAG,IAAA,kBAAU,EAAC,YAAY,CAAC,CAAA;IAC7C,IAAI,CAAC,YAAY,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;KACvE;IACD,OAAO,YAAY,CAAA;AACrB,CAAC,CAAA;AANY,QAAA,QAAQ,YAMpB;AAMD,MAAM,aAAa,GAAuC,CAAC,EAAE,KAAK,EAAE,QAAQ,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AA;AACrB,CAAC,CAAA;AANY,QAAA,QAAQ,YAMpB;AAED,MAAM,aAAa,GAAgC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAClE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAsC;QACtE,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,SAAS;KACjB,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAQ,EAAE;QACvC,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAA;IACrC,CAAC,CAAA;IAED,OAAO,CACL,oBAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,kBAAI,QAAQ,IAAK,KAAK;QAChD,oBAAC,4BAAkB,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK;YACpC,oBAAC,4BAAkB,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK;gBACpC,oBAAC,uBAAa,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK;oBAC/B,oBAAC,8BAAoB,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,IAAG,QAAQ,CAAwB,CAC7D,CACG,CACF,CACC,CACzB,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,aAAa,CAAA"}
+\ No newline at end of file
diff --git a/build/AgentProvider.d.ts b/build/AgentProvider.d.ts
index d6256cc1bcfa8d8fa2394ea86c486b62e4f7feeb..6ca0215eff6a70135ee8ff7646330f8762254b79 100644
--- a/build/AgentProvider.d.ts
+++ b/build/AgentProvider.d.ts
@@ -4,10 +4,8 @@ import * as React from 'react';
interface AgentContextInterface {
loading: boolean;
agent?: Agent;
+ setAgent: (agent?: Agent) => void;
}
export declare const useAgent: () => AgentContextInterface;
-interface Props {
- agent: Agent | undefined;
-}
-declare const AgentProvider: React.FC<PropsWithChildren<Props>>;
+declare const AgentProvider: React.FC<PropsWithChildren>;
export default AgentProvider;
diff --git a/build/AgentProvider.js b/build/AgentProvider.js
index b30b8b56c34a6745d86251e3a7f3398e7d13e3f2..1c6c16abf1c0c610e4c75638431abfc8c59277d7 100644
--- a/build/AgentProvider.js
+++ b/build/AgentProvider.js
@@ -38,24 +38,19 @@ const useAgent = () => {
return agentContext;
};
exports.useAgent = useAgent;
-const AgentProvider = ({ agent, children }) => {
- const [agentState, setAgentState] = (0, react_1.useState)({
+const AgentProvider = ({ children }) => {
+ const [state, setState] = (0, react_1.useState)({
loading: true,
- agent,
+ agent: undefined,
});
- const setInitialState = async () => {
- if (agent) {
- setAgentState({ agent, loading: false });
- }
+ const setAgent = (agent) => {
+ setState({ agent, loading: false });
};
- (0, react_1.useEffect)(() => {
- setInitialState();
- }, [agent]);
- return (React.createElement(AgentContext.Provider, { value: agentState },
- React.createElement(ConnectionProvider_1.default, { agent: agent },
- React.createElement(CredentialProvider_1.default, { agent: agent },
- React.createElement(ProofProvider_1.default, { agent: agent },
- React.createElement(BasicMessageProvider_1.default, { agent: agent }, children))))));
+ return (React.createElement(AgentContext.Provider, { value: Object.assign({ setAgent }, state) },
+ React.createElement(ConnectionProvider_1.default, { agent: state.agent },
+ React.createElement(CredentialProvider_1.default, { agent: state.agent },
+ React.createElement(ProofProvider_1.default, { agent: state.agent },
+ React.createElement(BasicMessageProvider_1.default, { agent: state.agent }, children))))));
};
exports.default = AgentProvider;
-//# sourceMappingURL=AgentProvider.js.map
\ No newline at end of file
+//# sourceMappingURL=AgentProvider.js.maps
\ No newline at end of file
diff --git a/build/AgentProvider.js.map b/build/AgentProvider.js.map
index dd4dc30fea84a15265a9a8d5f9e707935874a716..f1f17a4db9bf79ebad55a860bd8b3de38c46f5f4 100644
--- a/build/AgentProvider.js.map
+++ b/build/AgentProvider.js.map
@@ -1 +1 @@
-{"version":3,"file":"AgentProvider.js","sourceRoot":"","sources":["../src/AgentProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGA,6CAA8B;AAC9B,iCAAsE;AAEtE,kFAAyD;AACzD,8EA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1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@react-navigation/core": "6.1.0",
"@react-navigation/native": "6.0.6",
"@react-navigation/stack": "6.0.11",
"@types/node": "16.9.6"
"@types/node": "16.9.6",
"@aries-framework/react-hooks": "patch:@aries-framework/react-hooks@npm:0.4.2#./.yarn/patches/@aries-framework-react-hooks-npm-0.4.2-84b7eb8764.patch"
}
}

This file was deleted.

Loading

0 comments on commit a8dac14

Please sign in to comment.