Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/gateway/filesystemwallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func NewFileSystemWallet(path string) (*Wallet, error) {
}

store := &fileSystemWalletStore{cleanPath}
return &Wallet{store}, nil
return NewWalletWithStore(store), nil

}

Expand Down
10 changes: 10 additions & 0 deletions pkg/gateway/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ type wallet interface {
List() ([]string, error)
}

// NewWalletWithStore is used for creating wallets with custom walletstores as backends.
// Parameters:
// store is the WalletStore you want to use as the backend for the wallet.
//
// Returns:
// The Wallet object.
func NewWalletWithStore(store WalletStore) *Wallet {
return &Wallet{store: store}
}

// A Wallet stores identity information used to connect to a Hyperledger Fabric network.
// Instances are created using factory methods on the implementing objects.
type Wallet struct {
Expand Down