Skip to content

Commit 98cc265

Browse files
committed
Add comment
1 parent ba13ced commit 98cc265

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

eclair-core/src/main/scala/fr/acinq/eclair/wire/protocol/OfferTypes.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,10 @@ object OfferTypes {
314314
Right(Offer(records))
315315
}
316316

317+
/**
318+
* An offer string can be split with '+' to fit in places with a low character limit. This validates that the string adheres to the spec format to guard against copy-pasting errors.
319+
* @return a lowercase string with '+' and whitespaces removed
320+
*/
317321
def validateFormat(s: String): String = {
318322
val lowercase = s.toLowerCase
319323
require(s == lowercase || s == s.toUpperCase)

0 commit comments

Comments
 (0)