-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete refactor of SeedVaultSimulator to use Hilt dependency inject…
…ion (#376)
- Loading branch information
Showing
15 changed files
with
162 additions
and
163 deletions.
There are no files selected for viewing
26 changes: 0 additions & 26 deletions
26
...tSimulator/src/main/java/com/solanamobile/seedvaultimpl/ApplicationDependencyContainer.kt
This file was deleted.
Oops, something went wrong.
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
22 changes: 22 additions & 0 deletions
22
SeedVaultSimulator/src/main/java/com/solanamobile/seedvaultimpl/SodiumAndroidProvider.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2024 Solana Mobile Inc. | ||
*/ | ||
|
||
package com.solanamobile.seedvaultimpl | ||
|
||
import com.goterl.lazysodium.LazySodiumAndroid | ||
import com.goterl.lazysodium.SodiumAndroid | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import java.nio.charset.StandardCharsets | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
class SodiumAndroidProvider { | ||
@Provides | ||
fun provideLazySodiumAndroid() : LazySodiumAndroid { | ||
return LazySodiumAndroid(SodiumAndroid(), StandardCharsets.UTF_8) | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.