Title: Decentralized Identity on XRP Ledger Revision: 1 (2023-02-09)
Author: Aanchal Malhotra Affiliation: Ripple
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//useSomethingAsync.js | |
export default () => { | |
const [thing, setThing] = useState(null); | |
useEffect(() => { | |
doAsyncThing().then(result => setThing(result)); | |
}, []); | |
return thing; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { connect } from 'react-redux'; | |
import { Route, Redirect } from 'react-router-dom'; | |
const PrivateRoute = ({component: Component, session, ...rest}) => { | |
return ( | |
<Route | |
{...rest} | |
render={(props) => session ? | |
<Component {...props} /> : |
I hereby claim:
- I am jvergeldedios on github.
- I am jvergeldedios (https://keybase.io/jvergeldedios) on keybase.
- I have a public key ASDbicAEpaEZfyAYn6MGeIg3olcQwFQU_zNX_5mWdnlDdAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyApp extends Application { | |
private ObjectGraph objectGraph; | |
public void onCreate() { | |
super.onCreate(); | |
objectGraph = ObjectGraph.create(new AppModule(this)); | |
} | |
public static void inject(Context context, Object toInject) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static final String PREFS_NAME = "MyPrefsFile"; | |
public static final String IMAGE_TEMP_PATH = "ImageTempPath"; | |
public static final int REQUEST_CAMERA = 1; | |
protected void launchCamera() | |
{ | |
// Setup a temporary storage path for the image and save it in SharedPreferences | |
String imageTempPath = "image_" + UUID.randomUUID() + ".jpg"; | |
getSharedPreferences(PREFS_NAME, 0).edit().putString(IMAGE_TEMP_PATH, imageTempPath).commit(); | |
File dir = getExternalFilesDir(Environment.DIRECTORY_PICTURES); |