-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from Chengxuan/multi-ns
udpate sandbox UI to support mult-namespaces
- Loading branch information
Showing
26 changed files
with
539 additions
and
178 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import FireFly from '@hyperledger/firefly-sdk'; | ||
import { InternalServerError } from 'routing-controllers'; | ||
|
||
const fireflySDKs = {}; | ||
|
||
export const getFireflyClient = (namespace: string = 'default') => { | ||
if (!fireflySDKs[namespace]) { | ||
fireflySDKs[namespace] = new FireFly({ | ||
host: process.env.FF_ENDPOINT || 'http://localhost:5000', | ||
namespace, | ||
}); | ||
fireflySDKs[namespace].onError((err) => { | ||
throw new InternalServerError(err.message); | ||
}); | ||
} | ||
return fireflySDKs[namespace]; | ||
}; |
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.