Skip to content

Commit cd881e7

Browse files
authored
Merge pull request #56 from ngraveio/fix/fountain-single
get decoded data when non-fragment UR has been passed to UrFountainDecoder
2 parents 9b839d0 + eee777f commit cd881e7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ngraveio/bc-ur",
3-
"version": "2.0.0-beta.6",
3+
"version": "2.0.0-beta.7",
44
"author": "Antonis Poulakis <antwnic4@gmail.com>, Irfan Bilaloğlu <irfanbilaloglu@gmail.com>, Pieter Uyttersprot <pieter.uyttersprot@ngrave.io>",
55
"description": "A JS implementation of the Uniform Resources (UR) specification from Blockchain Commons",
66
"license": "MIT",

src/classes/UrFountainDecoder.ts

+6
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ export class UrFountainDecoder extends FountainDecoder {
7171
this.started = true;
7272
this.done = true;
7373

74+
try {
75+
this.decodedData = this.resultUr.decode();
76+
} catch (error) {
77+
this.error = error;
78+
}
79+
7480
// Finish here
7581
return true;
7682
}

0 commit comments

Comments
 (0)